Skip to content

Commit fb5b460

Browse files
committed
remove decrypt case from switch statements
1 parent f9d41da commit fb5b460

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/qt/askpassphrasedialog.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ AskPassphraseDialog::AskPassphraseDialog(Mode _mode, QWidget *parent, SecureStri
5858
ui->passEdit3->hide();
5959
setWindowTitle(tr("Unlock wallet"));
6060
break;
61-
case Decrypt: // Ask passphrase
62-
ui->warningLabel->setText(tr("This operation needs your wallet passphrase to decrypt the wallet."));
63-
ui->passLabel2->hide();
64-
ui->passEdit2->hide();
65-
ui->passLabel3->hide();
66-
ui->passEdit3->hide();
67-
setWindowTitle(tr("Decrypt wallet"));
68-
break;
6961
case ChangePass: // Ask old passphrase + new passphrase x2
7062
setWindowTitle(tr("Change passphrase"));
7163
ui->warningLabel->setText(tr("Enter the old passphrase and new passphrase for the wallet."));
@@ -176,17 +168,6 @@ void AskPassphraseDialog::accept()
176168
QMessageBox::critical(this, tr("Wallet unlock failed"), e.what());
177169
}
178170
break;
179-
case Decrypt:
180-
if(!model->setWalletEncrypted(false, oldpass))
181-
{
182-
QMessageBox::critical(this, tr("Wallet decryption failed"),
183-
tr("The passphrase entered for the wallet decryption was incorrect."));
184-
}
185-
else
186-
{
187-
QDialog::accept(); // Success
188-
}
189-
break;
190171
case ChangePass:
191172
if(newpass1 == newpass2)
192173
{
@@ -221,9 +202,6 @@ void AskPassphraseDialog::textChanged()
221202
acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty();
222203
break;
223204
case Unlock: // Old passphrase x1
224-
case Decrypt:
225-
acceptable = !ui->passEdit1->text().isEmpty();
226-
break;
227205
case ChangePass: // Old passphrase x1, new passphrase x2
228206
acceptable = !ui->passEdit1->text().isEmpty() && !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty();
229207
break;

0 commit comments

Comments
 (0)