mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-04 13:55:23 -05:00
qt, wallet: Drop unused parameter in WalletModel::setWalletEncrypted
This commit is contained in:
parent
f886a20b02
commit
4146a31ccb
3 changed files with 5 additions and 11 deletions
|
@ -125,8 +125,7 @@ void AskPassphraseDialog::accept()
|
||||||
"</b></qt>");
|
"</b></qt>");
|
||||||
} else {
|
} else {
|
||||||
assert(model != nullptr);
|
assert(model != nullptr);
|
||||||
if(model->setWalletEncrypted(true, newpass1))
|
if (model->setWalletEncrypted(newpass1)) {
|
||||||
{
|
|
||||||
QMessageBox::warning(this, tr("Wallet encrypted"),
|
QMessageBox::warning(this, tr("Wallet encrypted"),
|
||||||
"<qt>" +
|
"<qt>" +
|
||||||
tr("Your wallet is now encrypted. ") + encryption_reminder +
|
tr("Your wallet is now encrypted. ") + encryption_reminder +
|
||||||
|
@ -136,9 +135,7 @@ void AskPassphraseDialog::accept()
|
||||||
"For security reasons, previous backups of the unencrypted wallet file "
|
"For security reasons, previous backups of the unencrypted wallet file "
|
||||||
"will become useless as soon as you start using the new, encrypted wallet.") +
|
"will become useless as soon as you start using the new, encrypted wallet.") +
|
||||||
"</b></qt>");
|
"</b></qt>");
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
QMessageBox::critical(this, tr("Wallet encryption failed"),
|
QMessageBox::critical(this, tr("Wallet encryption failed"),
|
||||||
tr("Wallet encryption failed due to an internal error. Your wallet was not encrypted."));
|
tr("Wallet encryption failed due to an internal error. Your wallet was not encrypted."));
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,13 +313,10 @@ WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WalletModel::setWalletEncrypted(bool encrypted, const SecureString &passphrase)
|
bool WalletModel::setWalletEncrypted(const SecureString& passphrase)
|
||||||
{
|
{
|
||||||
if (encrypted) {
|
|
||||||
return m_wallet->encryptWallet(passphrase);
|
return m_wallet->encryptWallet(passphrase);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool WalletModel::setWalletLocked(bool locked, const SecureString &passPhrase)
|
bool WalletModel::setWalletLocked(bool locked, const SecureString &passPhrase)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,7 +105,7 @@ public:
|
||||||
SendCoinsReturn sendCoins(WalletModelTransaction &transaction);
|
SendCoinsReturn sendCoins(WalletModelTransaction &transaction);
|
||||||
|
|
||||||
// Wallet encryption
|
// Wallet encryption
|
||||||
bool setWalletEncrypted(bool encrypted, const SecureString &passphrase);
|
bool setWalletEncrypted(const SecureString& passphrase);
|
||||||
// Passphrase only needed when unlocking
|
// Passphrase only needed when unlocking
|
||||||
bool setWalletLocked(bool locked, const SecureString &passPhrase=SecureString());
|
bool setWalletLocked(bool locked, const SecureString &passPhrase=SecureString());
|
||||||
bool changePassphrase(const SecureString &oldPass, const SecureString &newPass);
|
bool changePassphrase(const SecureString &oldPass, const SecureString &newPass);
|
||||||
|
|
Loading…
Add table
Reference in a new issue