aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorAndrew Chow <[email protected]>2020-10-07 21:36:44 -0400
committerAndrew Chow <[email protected]>2020-10-07 21:36:44 -0400
commit907f142fc7e1d35f443be076367739faf11cc2cc (patch)
tree8b7aaa0647bfaeaf3e16751ccdfb477643476b97 /src/wallet/rpcwallet.cpp
parentMerge #20092: util: Do not use gArgs global in ArgsManager member functions (diff)
downloaddiscoin-907f142fc7e1d35f443be076367739faf11cc2cc.tar.xz
discoin-907f142fc7e1d35f443be076367739faf11cc2cc.zip
rpc: change no wallet loaded message to be clearer
Changes the no wallet is loaded rpc error message to be clearer that no wallet is loaded and how the user can load or create a wallet. Also changes the error code from METHOD_NOT_FOUND to RPC_WALLET_NOT_FOUND as that makes more sense.
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 4a11eb166..23291e3a4 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -112,7 +112,7 @@ std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& reques
if (wallets.empty()) {
throw JSONRPCError(
- RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)");
+ RPC_WALLET_NOT_FOUND, "No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)");
}
throw JSONRPCError(RPC_WALLET_NOT_SPECIFIED,
"Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path).");