aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-10-23 19:51:19 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-10-23 19:55:23 +0300
commit6e950118a31fd6a85026d934fc6adb6255e47e23 (patch)
treed8cdb65d6080a325af3915835913a1c8aaba94aa /src
parent49984b44cfcd3fd0cef16c8ce97197973afc3c04 (diff)
qt, wallet: Remove unused AskPassphraseDialog::Decrypt
Co-authored-by: Sehyun Chung <sehyun@berkeley.edu>
Diffstat (limited to 'src')
-rw-r--r--src/qt/askpassphrasedialog.cpp22
-rw-r--r--src/qt/askpassphrasedialog.h1
-rw-r--r--src/qt/walletview.cpp2
3 files changed, 1 insertions, 24 deletions
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index 3d1963b6e6..ce5fa03bb2 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -58,14 +58,6 @@ AskPassphraseDialog::AskPassphraseDialog(Mode _mode, QWidget *parent, SecureStri
ui->passEdit3->hide();
setWindowTitle(tr("Unlock wallet"));
break;
- case Decrypt: // Ask passphrase
- ui->warningLabel->setText(tr("This operation needs your wallet passphrase to decrypt the wallet."));
- ui->passLabel2->hide();
- ui->passEdit2->hide();
- ui->passLabel3->hide();
- ui->passEdit3->hide();
- setWindowTitle(tr("Decrypt wallet"));
- break;
case ChangePass: // Ask old passphrase + new passphrase x2
setWindowTitle(tr("Change passphrase"));
ui->warningLabel->setText(tr("Enter the old passphrase and new passphrase for the wallet."));
@@ -176,17 +168,6 @@ void AskPassphraseDialog::accept()
QMessageBox::critical(this, tr("Wallet unlock failed"), e.what());
}
break;
- case Decrypt:
- if(!model->setWalletEncrypted(false, oldpass))
- {
- QMessageBox::critical(this, tr("Wallet decryption failed"),
- tr("The passphrase entered for the wallet decryption was incorrect."));
- }
- else
- {
- QDialog::accept(); // Success
- }
- break;
case ChangePass:
if(newpass1 == newpass2)
{
@@ -221,9 +202,6 @@ void AskPassphraseDialog::textChanged()
acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty();
break;
case Unlock: // Old passphrase x1
- case Decrypt:
- acceptable = !ui->passEdit1->text().isEmpty();
- break;
case ChangePass: // Old passphrase x1, new passphrase x2
acceptable = !ui->passEdit1->text().isEmpty() && !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty();
break;
diff --git a/src/qt/askpassphrasedialog.h b/src/qt/askpassphrasedialog.h
index 9557e72936..f3ba882277 100644
--- a/src/qt/askpassphrasedialog.h
+++ b/src/qt/askpassphrasedialog.h
@@ -26,7 +26,6 @@ public:
Encrypt, /**< Ask passphrase twice and encrypt */
Unlock, /**< Ask passphrase and unlock */
ChangePass, /**< Ask old passphrase + new passphrase twice */
- Decrypt /**< Ask passphrase and decrypt wallet */
};
explicit AskPassphraseDialog(Mode mode, QWidget *parent, SecureString* passphrase_out = nullptr);
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index 2fc883a5f5..e6127332ee 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -262,7 +262,7 @@ void WalletView::encryptWallet(bool status)
{
if(!walletModel)
return;
- AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Decrypt, this);
+ AskPassphraseDialog dlg(AskPassphraseDialog::Encrypt, this);
dlg.setModel(walletModel);
dlg.exec();