aboutsummaryrefslogtreecommitdiff
path: root/src/qt/askpassphrasedialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/askpassphrasedialog.cpp')
-rw-r--r--src/qt/askpassphrasedialog.cpp27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index 3d1963b6e6..3be8b664dd 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."));
@@ -133,8 +125,7 @@ void AskPassphraseDialog::accept()
"</b></qt>");
} else {
assert(model != nullptr);
- if(model->setWalletEncrypted(true, newpass1))
- {
+ if (model->setWalletEncrypted(newpass1)) {
QMessageBox::warning(this, tr("Wallet encrypted"),
"<qt>" +
tr("Your wallet is now encrypted. ") + encryption_reminder +
@@ -144,9 +135,7 @@ void AskPassphraseDialog::accept()
"For security reasons, previous backups of the unencrypted wallet file "
"will become useless as soon as you start using the new, encrypted wallet.") +
"</b></qt>");
- }
- else
- {
+ } else {
QMessageBox::critical(this, tr("Wallet encryption failed"),
tr("Wallet encryption failed due to an internal error. Your wallet was not encrypted."));
}
@@ -176,17 +165,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,7 +199,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