diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index f905635af1..9f3f325abd 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -53,14 +53,6 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget* parent) ui->repeatNewPassphraseEdit->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->newPassphraseLabel->hide(); - ui->newPassphraseEdit->hide(); - ui->repeatNewPassphraseLabel->hide(); - ui->repeatNewPassphraseEdit->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 and new passphrase to the wallet.")); @@ -162,17 +154,6 @@ void AskPassphraseDialog::accept() QDialog::accept(); // Success } 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) { @@ -208,9 +189,6 @@ void AskPassphraseDialog::textChanged() break; case UnlockStaking: case Unlock: // Old passphrase x1 - case Decrypt: - acceptable = !ui->oldPassphraseEdit->text().isEmpty(); - break; case ChangePass: // Old passphrase x1, new passphrase x2 acceptable = !ui->oldPassphraseEdit->text().isEmpty() && !ui->newPassphraseEdit->text().isEmpty() && !ui->repeatNewPassphraseEdit->text().isEmpty(); break; diff --git a/src/qt/askpassphrasedialog.h b/src/qt/askpassphrasedialog.h index 32b9cf07f0..03b963ae02 100644 --- a/src/qt/askpassphrasedialog.h +++ b/src/qt/askpassphrasedialog.h @@ -21,7 +21,6 @@ class AskPassphraseDialog : public QDialog UnlockStaking, /**< Ask passphrase and unlock */ Unlock, /**< Ask passphrase and unlock */ ChangePass, /**< Ask old passphrase + new passphrase twice */ - Decrypt /**< Ask passphrase and decrypt wallet */ }; explicit AskPassphraseDialog(Mode mode, QWidget* parent = nullptr); diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index b827476ba0..35982442f1 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -384,7 +384,7 @@ void BitcoinGUI::createActions() researcherAction->setToolTip(tr("Open BOINC and beacon settings for Gridcoin")); toggleHideAction = new QAction(tr("&Show / Hide"), this); encryptWalletAction = new QAction(tr("&Encrypt Wallet..."), this); - encryptWalletAction->setToolTip(tr("Encrypt or decrypt wallet")); + encryptWalletAction->setToolTip(tr("Encrypt wallet")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(tr("&Backup Wallet/Config..."), this); backupWalletAction->setToolTip(tr("Backup wallet/config to another location")); @@ -1480,7 +1480,7 @@ void BitcoinGUI::setEncryptionStatus(int status) changePassphraseAction->setEnabled(true); unlockWalletAction->setVisible(false); lockWalletAction->setVisible(true); - encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported + encryptWalletAction->setEnabled(false); break; case WalletModel::Locked: labelEncryptionIcon->setPixmap(GRC::ScaleStatusIcon(this, ":/icons/status_encryption_locked_" + sSheet)); @@ -1489,7 +1489,7 @@ void BitcoinGUI::setEncryptionStatus(int status) changePassphraseAction->setEnabled(true); unlockWalletAction->setVisible(true); lockWalletAction->setVisible(false); - encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported + encryptWalletAction->setEnabled(false); break; } } @@ -1498,8 +1498,7 @@ void BitcoinGUI::encryptWallet(bool status) { if(!walletModel) return; - AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt: - AskPassphraseDialog::Decrypt, this); + AskPassphraseDialog dlg(AskPassphraseDialog::Encrypt, this); dlg.setModel(walletModel); dlg.exec(); diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index da99bc0a7e..013060d6f9 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -332,7 +332,6 @@ bool WalletModel::setWalletEncrypted(bool encrypted, const SecureString &passphr } else { - // Decrypt -- TODO; not supported yet return false; } }