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()
125125 " </b></qt>" );
126126 } else {
127127 assert (model != nullptr );
128- if (model->setWalletEncrypted (true , newpass1))
129- {
128+ if (model->setWalletEncrypted (newpass1)) {
130129 QMessageBox::warning (this , tr (" Wallet encrypted" ),
131130 " <qt>" +
132131 tr (" Your wallet is now encrypted. " ) + encryption_reminder +
@@ -136,9 +135,7 @@ void AskPassphraseDialog::accept()
136135 " For security reasons, previous backups of the unencrypted wallet file "
137136 " will become useless as soon as you start using the new, encrypted wallet." ) +
138137 " </b></qt>" );
139- }
140- else
141- {
138+ } else {
142139 QMessageBox::critical (this , tr (" Wallet encryption failed" ),
143140 tr (" Wallet encryption failed due to an internal error. Your wallet was not encrypted." ));
144141 }
Original file line number Diff line number Diff line change @@ -313,12 +313,9 @@ WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const
313313 }
314314}
315315
316- bool WalletModel::setWalletEncrypted (bool encrypted, const SecureString & passphrase)
316+ bool WalletModel::setWalletEncrypted (const SecureString& passphrase)
317317{
318- if (encrypted) {
319- return m_wallet->encryptWallet (passphrase);
320- }
321- return false ;
318+ return m_wallet->encryptWallet (passphrase);
322319}
323320
324321bool 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
105105 SendCoinsReturn sendCoins (WalletModelTransaction &transaction);
106106
107107 // Wallet encryption
108- bool setWalletEncrypted (bool encrypted, const SecureString & passphrase);
108+ bool setWalletEncrypted (const SecureString& passphrase);
109109 // Passphrase only needed when unlocking
110110 bool setWalletLocked (bool locked, const SecureString &passPhrase=SecureString());
111111 bool changePassphrase (const SecureString &oldPass, const SecureString &newPass);
You can’t perform that action at this time.
0 commit comments