mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Better error message for user when corrupt wallet unlock fails
This commit is contained in:
@@ -152,14 +152,15 @@ void AskPassphraseDialog::accept()
|
||||
}
|
||||
} break;
|
||||
case Unlock:
|
||||
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
|
||||
try {
|
||||
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
|
||||
}
|
||||
} catch (const std::runtime_error& e) {
|
||||
QMessageBox::critical(this, tr("Wallet unlock failed"), e.what());
|
||||
}
|
||||
break;
|
||||
case Decrypt:
|
||||
|
||||
Reference in New Issue
Block a user