File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,7 @@ void AskPassphraseDialog::accept()
125
125
" </b></qt>" );
126
126
} else {
127
127
assert (model != nullptr );
128
- if (model->setWalletEncrypted (true , newpass1))
129
- {
128
+ if (model->setWalletEncrypted (newpass1)) {
130
129
QMessageBox::warning (this , tr (" Wallet encrypted" ),
131
130
" <qt>" +
132
131
tr (" Your wallet is now encrypted. " ) + encryption_reminder +
@@ -136,9 +135,7 @@ void AskPassphraseDialog::accept()
136
135
" For security reasons, previous backups of the unencrypted wallet file "
137
136
" will become useless as soon as you start using the new, encrypted wallet." ) +
138
137
" </b></qt>" );
139
- }
140
- else
141
- {
138
+ } else {
142
139
QMessageBox::critical (this , tr (" Wallet encryption failed" ),
143
140
tr (" Wallet encryption failed due to an internal error. Your wallet was not encrypted." ));
144
141
}
Original file line number Diff line number Diff line change @@ -313,12 +313,9 @@ WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const
313
313
}
314
314
}
315
315
316
- bool WalletModel::setWalletEncrypted (bool encrypted, const SecureString & passphrase)
316
+ bool WalletModel::setWalletEncrypted (const SecureString& passphrase)
317
317
{
318
- if (encrypted) {
319
- return m_wallet->encryptWallet (passphrase);
320
- }
321
- return false ;
318
+ return m_wallet->encryptWallet (passphrase);
322
319
}
323
320
324
321
bool WalletModel::setWalletLocked (bool locked, const SecureString &passPhrase)
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ class WalletModel : public QObject
105
105
SendCoinsReturn sendCoins (WalletModelTransaction &transaction);
106
106
107
107
// Wallet encryption
108
- bool setWalletEncrypted (bool encrypted, const SecureString & passphrase);
108
+ bool setWalletEncrypted (const SecureString& passphrase);
109
109
// Passphrase only needed when unlocking
110
110
bool setWalletLocked (bool locked, const SecureString &passPhrase=SecureString());
111
111
bool changePassphrase (const SecureString &oldPass, const SecureString &newPass);
You can’t perform that action at this time.
0 commit comments