mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	Merge pull request 'VerifyProofDialog: minor fixes' (#166) from tobtoht/feather:tx_proof_width into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/166
This commit is contained in:
		
						commit
						9d781d1b57
					
				
					 3 changed files with 87 additions and 129 deletions
				
			
		| 
						 | 
				
			
			@ -16,26 +16,28 @@ VerifyProofDialog::VerifyProofDialog(Wallet *wallet, QWidget *parent)
 | 
			
		|||
{
 | 
			
		||||
    ui->setupUi(this);
 | 
			
		||||
 | 
			
		||||
    connect(ui->btn_verifySpendProof, &QPushButton::clicked, this, &VerifyProofDialog::checkSpendProof);
 | 
			
		||||
    connect(ui->btn_verifyOutProof, &QPushButton::clicked, this, &VerifyProofDialog::checkOutProof);
 | 
			
		||||
    connect(ui->btn_verifyInProof, &QPushButton::clicked, this, &VerifyProofDialog::checkInProof);
 | 
			
		||||
    connect(ui->btn_verify, &QPushButton::clicked, this, &VerifyProofDialog::checkProof);
 | 
			
		||||
 | 
			
		||||
    connect(ui->btn_spendClear, &QPushButton::clicked, [this](){
 | 
			
		||||
    connect(ui->btn_clear, &QPushButton::clicked, [this]{
 | 
			
		||||
        switch (ui->tabWidget->currentIndex()) {
 | 
			
		||||
            case 0:
 | 
			
		||||
                ui->lineEdit_spendTxID->clear();
 | 
			
		||||
                ui->lineEdit_spendMessage->clear();
 | 
			
		||||
                ui->input_SpendProof->clear();
 | 
			
		||||
    });
 | 
			
		||||
    connect(ui->btn_outClear, &QPushButton::clicked, [this](){
 | 
			
		||||
                break;
 | 
			
		||||
            case 1:
 | 
			
		||||
                ui->lineEdit_outTxID->clear();
 | 
			
		||||
                ui->lineEdit_outAddress->clear();
 | 
			
		||||
                ui->lineEdit_outMessage->clear();
 | 
			
		||||
                ui->input_OutProof->clear();
 | 
			
		||||
    });
 | 
			
		||||
    connect(ui->btn_inClear, &QPushButton::clicked, [this](){
 | 
			
		||||
                break;
 | 
			
		||||
            case 2:
 | 
			
		||||
                ui->lineEdit_inTxID->clear();
 | 
			
		||||
                ui->lineEdit_inAddress->clear();
 | 
			
		||||
                ui->lineEdit_inMessage->clear();
 | 
			
		||||
                ui->input_InProof->clear();
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -44,6 +46,20 @@ VerifyProofDialog::~VerifyProofDialog()
 | 
			
		|||
    delete ui;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VerifyProofDialog::checkProof() {
 | 
			
		||||
    switch (ui->tabWidget->currentIndex()) {
 | 
			
		||||
        case 0:
 | 
			
		||||
            this->checkSpendProof();
 | 
			
		||||
            break;
 | 
			
		||||
        case 1:
 | 
			
		||||
            this->checkOutProof();
 | 
			
		||||
            break;
 | 
			
		||||
        case 2:
 | 
			
		||||
            this->checkInProof();
 | 
			
		||||
            break;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VerifyProofDialog::checkSpendProof() {
 | 
			
		||||
    auto r = m_wallet->checkSpendProof(ui->lineEdit_spendTxID->text(), ui->lineEdit_spendMessage->text(), ui->input_SpendProof->toPlainText());
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,12 +20,13 @@ public:
 | 
			
		|||
    ~VerifyProofDialog() override;
 | 
			
		||||
 | 
			
		||||
private slots:
 | 
			
		||||
    void checkSpendProof();
 | 
			
		||||
    void checkOutProof();
 | 
			
		||||
    void checkInProof();
 | 
			
		||||
    void checkProof();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    void checkTxProof(const QString &txId, const QString &address, const QString &message, const QString &signature);
 | 
			
		||||
    void checkSpendProof();
 | 
			
		||||
    void checkOutProof();
 | 
			
		||||
    void checkInProof();
 | 
			
		||||
 | 
			
		||||
    Ui::VerifyProofDialog *ui;
 | 
			
		||||
    Wallet *m_wallet;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,17 +39,7 @@
 | 
			
		|||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item>
 | 
			
		||||
        <layout class="QFormLayout" name="formLayout">
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_3">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Transaction ID:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="1">
 | 
			
		||||
          <widget class="QLineEdit" name="lineEdit_spendTxID"/>
 | 
			
		||||
         </item>
 | 
			
		||||
        <layout class="QGridLayout" name="gridLayout_3">
 | 
			
		||||
         <item row="1" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_4">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
| 
						 | 
				
			
			@ -57,10 +47,13 @@
 | 
			
		|||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="2" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_5">
 | 
			
		||||
         <item row="0" column="1">
 | 
			
		||||
          <widget class="QLineEdit" name="lineEdit_spendTxID"/>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_3">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>SpendProof:</string>
 | 
			
		||||
            <string>Transaction ID:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
| 
						 | 
				
			
			@ -71,6 +64,13 @@
 | 
			
		|||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="2" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_5">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>SpendProof:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="2" column="1">
 | 
			
		||||
          <widget class="QPlainTextEdit" name="input_SpendProof">
 | 
			
		||||
           <property name="overwriteMode">
 | 
			
		||||
| 
						 | 
				
			
			@ -96,37 +96,6 @@
 | 
			
		|||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item>
 | 
			
		||||
        <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
         <item>
 | 
			
		||||
          <spacer name="horizontalSpacer_2">
 | 
			
		||||
           <property name="orientation">
 | 
			
		||||
            <enum>Qt::Horizontal</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="sizeHint" stdset="0">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>40</width>
 | 
			
		||||
             <height>20</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
          </spacer>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QPushButton" name="btn_spendClear">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Clear</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QPushButton" name="btn_verifySpendProof">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Verify</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
     <widget class="QWidget" name="OutProof">
 | 
			
		||||
| 
						 | 
				
			
			@ -213,37 +182,6 @@
 | 
			
		|||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item>
 | 
			
		||||
        <layout class="QHBoxLayout" name="horizontalLayout">
 | 
			
		||||
         <item>
 | 
			
		||||
          <spacer name="horizontalSpacer">
 | 
			
		||||
           <property name="orientation">
 | 
			
		||||
            <enum>Qt::Horizontal</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="sizeHint" stdset="0">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>40</width>
 | 
			
		||||
             <height>20</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
          </spacer>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QPushButton" name="btn_outClear">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Clear</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QPushButton" name="btn_verifyOutProof">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>Verify</string>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
     <widget class="QWidget" name="InProof">
 | 
			
		||||
| 
						 | 
				
			
			@ -331,10 +269,14 @@
 | 
			
		|||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
        <layout class="QHBoxLayout" name="horizontalLayout_3">
 | 
			
		||||
    <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
     <item>
 | 
			
		||||
          <spacer name="horizontalSpacer_3">
 | 
			
		||||
      <spacer name="horizontalSpacer_2">
 | 
			
		||||
       <property name="orientation">
 | 
			
		||||
        <enum>Qt::Horizontal</enum>
 | 
			
		||||
       </property>
 | 
			
		||||
| 
						 | 
				
			
			@ -347,27 +289,26 @@
 | 
			
		|||
      </spacer>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
          <widget class="QPushButton" name="btn_inClear">
 | 
			
		||||
      <widget class="QPushButton" name="btn_clear">
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>Clear</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
          <widget class="QPushButton" name="btn_verifyInProof">
 | 
			
		||||
      <widget class="QPushButton" name="btn_verify">
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>Verify</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="default">
 | 
			
		||||
        <bool>true</bool>
 | 
			
		||||
       </property>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
    </layout>
 | 
			
		||||
   </item>
 | 
			
		||||
  </layout>
 | 
			
		||||
 </widget>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
  </layout>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue