diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2330,7 +2330,7 @@ return NullUniValue; } - if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) { + if (request.fHelp || request.params.size() != 2) { throw std::runtime_error(RPCHelpMan{ "walletpassphrase", "\nStores the wallet decryption key in memory for 'timeout' " @@ -2438,7 +2438,7 @@ return NullUniValue; } - if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) { + if (request.fHelp || request.params.size() != 2) { throw std::runtime_error(RPCHelpMan{ "walletpassphrasechange", "\nChanges the wallet passphrase from 'oldpassphrase' to " @@ -2505,7 +2505,7 @@ return NullUniValue; } - if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 0)) { + if (request.fHelp || request.params.size() != 0) { throw std::runtime_error(RPCHelpMan{ "walletlock", "\nRemoves the wallet encryption key from memory, locking the " @@ -2558,8 +2558,7 @@ return NullUniValue; } - if (!pwallet->IsCrypted() && - (request.fHelp || request.params.size() != 1)) { + if (request.fHelp || request.params.size() != 1) { throw std::runtime_error(RPCHelpMan{ "encryptwallet", "\nEncrypts the wallet with 'passphrase'. This is for first time "