#include <QPushButton>
#include <QKeyEvent>
+extern bool fWalletUnlockMintOnly;
+
AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::AskPassphraseDialog),
setWindowTitle(tr("Encrypt wallet"));
break;
case Unlock: // Ask passphrase
+ case UnlockMining:
ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet."));
ui->passLabel2->hide();
ui->passEdit2->hide();
QDialog::accept(); // Success
}
break;
+ case UnlockMining:
+ if(!model->setWalletLocked(false, oldpass))
+ {
+ QMessageBox::critical(this, tr("Wallet unlock failed"),
+ tr("The passphrase entered for the wallet decryption was incorrect."));
+ }
+ else
+ {
+ QDialog::accept(); // Success
+ fWalletUnlockMintOnly = true;
+ }
+ break;
case Decrypt:
if(!model->setWalletEncrypted(false, oldpass))
{
acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty();
break;
case Unlock: // Old passphrase x1
+ case UnlockMining:
case Decrypt:
acceptable = !ui->passEdit1->text().isEmpty();
break;