diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 0907f2aabd6..c3a64cf46aa 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -106,7 +106,7 @@ std::shared_ptr GetWalletForJSONRPCRequest(const JSONRPCRequest& reques return wallets[0]; } - if (!HasWallets()) { + if (wallets.empty()) { throw JSONRPCError( RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)"); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a59aa8b9801..5f318f92add 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -77,12 +77,6 @@ bool RemoveWallet(const std::shared_ptr& wallet) return true; } -bool HasWallets() -{ - LOCK(cs_wallets); - return !vpwallets.empty(); -} - std::vector> GetWallets() { LOCK(cs_wallets); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 67331dc3be0..cf000b0b705 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -51,7 +51,6 @@ void UnloadWallet(std::shared_ptr&& wallet); bool AddWallet(const std::shared_ptr& wallet); bool RemoveWallet(const std::shared_ptr& wallet); -bool HasWallets(); std::vector> GetWallets(); std::shared_ptr GetWallet(const std::string& name); std::shared_ptr LoadWallet(interfaces::Chain& chain, const WalletLocation& location, bilingual_str& error, std::vector& warnings);