mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
Disallow encryption of watchonly wallets
Watchonly wallets do not have any private keys to encrypt. It does not make sense to encrypt such wallets, so disable the option to encrypt them. This avoids an assertion that can be hit when encrypting watchonly descriptor wallets.
This commit is contained in:
@@ -1350,6 +1350,12 @@ void BitcoinGUI::setEncryptionStatus(int status)
|
||||
{
|
||||
switch(status)
|
||||
{
|
||||
case WalletModel::NoKeys:
|
||||
labelWalletEncryptionIcon->hide();
|
||||
encryptWalletAction->setChecked(false);
|
||||
changePassphraseAction->setEnabled(false);
|
||||
encryptWalletAction->setEnabled(false);
|
||||
break;
|
||||
case WalletModel::Unencrypted:
|
||||
labelWalletEncryptionIcon->hide();
|
||||
encryptWalletAction->setChecked(false);
|
||||
|
||||
Reference in New Issue
Block a user