Skip to content

Commit 6e36ac1

Browse files
hebastoPiRK
authored andcommitted
qt, wallet: Drop unused parameter in WalletModel::setWalletEncrypted
Summary: This is a backport of [[bitcoin-core/gui#109 | core-gui#109]] [3/3] bitcoin-core/gui@4146a31 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10739
1 parent ca88506 commit 6e36ac1

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/qt/askpassphrasedialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void AskPassphraseDialog::accept() {
129129
encryption_reminder + "</b></qt>");
130130
} else {
131131
assert(model != nullptr);
132-
if (model->setWalletEncrypted(true, newpass1)) {
132+
if (model->setWalletEncrypted(newpass1)) {
133133
QMessageBox::warning(
134134
this, tr("Wallet encrypted"),
135135
"<qt>" + tr("Your wallet is now encrypted. ") +

src/qt/walletmodel.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,8 @@ WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const {
338338
}
339339
}
340340

341-
bool WalletModel::setWalletEncrypted(bool encrypted,
342-
const SecureString &passphrase) {
343-
if (encrypted) {
344-
return m_wallet->encryptWallet(passphrase);
345-
}
346-
return false;
341+
bool WalletModel::setWalletEncrypted(const SecureString &passphrase) {
342+
return m_wallet->encryptWallet(passphrase);
347343
}
348344

349345
bool WalletModel::setWalletLocked(bool locked, const SecureString &passPhrase) {

src/qt/walletmodel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class WalletModel : public QObject {
104104
SendCoinsReturn sendCoins(WalletModelTransaction &transaction);
105105

106106
// Wallet encryption
107-
bool setWalletEncrypted(bool encrypted, const SecureString &passphrase);
107+
bool setWalletEncrypted(const SecureString &passphrase);
108108
// Passphrase only needed when unlocking
109109
bool setWalletLocked(bool locked,
110110
const SecureString &passPhrase = SecureString());

0 commit comments

Comments
 (0)