diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/rpc/backup.cpp | 10 | ||||
-rw-r--r-- | src/wallet/rpc/wallet.cpp | 20 |
2 files changed, 8 insertions, 22 deletions
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp index b93419292e..af8043f158 100644 --- a/src/wallet/rpc/backup.cpp +++ b/src/wallet/rpc/backup.cpp @@ -1862,7 +1862,7 @@ RPCHelpMan listdescriptors() RPCHelpMan backupwallet() { return RPCHelpMan{"backupwallet", - "\nSafely copies current wallet file to destination, which can be a directory or a path with filename.\n", + "\nSafely copies the current wallet file to the specified destination, which can either be a directory or a path with a filename.\n", { {"destination", RPCArg::Type::STR, RPCArg::Optional::NO, "The destination directory or file"}, }, @@ -1897,7 +1897,7 @@ RPCHelpMan restorewallet() { return RPCHelpMan{ "restorewallet", - "\nRestore and loads a wallet from backup.\n" + "\nRestores and loads a wallet from backup.\n" "\nThe rescan is significantly faster if a descriptor wallet is restored" "\nand block filters are available (using startup option \"-blockfilterindex=1\").\n", { @@ -1909,8 +1909,7 @@ RPCHelpMan restorewallet() RPCResult::Type::OBJ, "", "", { {RPCResult::Type::STR, "name", "The wallet name if restored successfully."}, - {RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to restoring the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"}, - {RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to restoring the wallet.", + {RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to restoring and loading the wallet.", { {RPCResult::Type::STR, "", ""}, }}, @@ -1943,9 +1942,6 @@ RPCHelpMan restorewallet() UniValue obj(UniValue::VOBJ); obj.pushKV("name", wallet->GetName()); - if (wallet->chain().rpcEnableDeprecated("walletwarningfield")) { - obj.pushKV("warning", Join(warnings, Untranslated("\n")).original); - } PushWarnings(warnings, obj); return obj; diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp index 340e4115af..fb4b642bba 100644 --- a/src/wallet/rpc/wallet.cpp +++ b/src/wallet/rpc/wallet.cpp @@ -221,7 +221,6 @@ static RPCHelpMan loadwallet() RPCResult::Type::OBJ, "", "", { {RPCResult::Type::STR, "name", "The wallet name if loaded successfully."}, - {RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to loading the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"}, {RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to loading the wallet.", { {RPCResult::Type::STR, "", ""}, @@ -258,9 +257,6 @@ static RPCHelpMan loadwallet() UniValue obj(UniValue::VOBJ); obj.pushKV("name", wallet->GetName()); - if (wallet->chain().rpcEnableDeprecated("walletwarningfield")) { - obj.pushKV("warning", Join(warnings, Untranslated("\n")).original); - } PushWarnings(warnings, obj); return obj; @@ -356,8 +352,7 @@ static RPCHelpMan createwallet() RPCResult::Type::OBJ, "", "", { {RPCResult::Type::STR, "name", "The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path."}, - {RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to creating the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"}, - {RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to creating the wallet.", + {RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to creating and loading the wallet.", { {RPCResult::Type::STR, "", ""}, }}, @@ -430,9 +425,6 @@ static RPCHelpMan createwallet() UniValue obj(UniValue::VOBJ); obj.pushKV("name", wallet->GetName()); - if (wallet->chain().rpcEnableDeprecated("walletwarningfield")) { - obj.pushKV("warning", Join(warnings, Untranslated("\n")).original); - } PushWarnings(warnings, obj); return obj; @@ -443,14 +435,13 @@ static RPCHelpMan createwallet() static RPCHelpMan unloadwallet() { return RPCHelpMan{"unloadwallet", - "Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.\n" + "Unloads the wallet referenced by the request endpoint, otherwise unloads the wallet specified in the argument.\n" "Specifying the wallet name on a wallet endpoint is invalid.", { {"wallet_name", RPCArg::Type::STR, RPCArg::DefaultHint{"the wallet name from the RPC endpoint"}, "The name of the wallet to unload. If provided both here and in the RPC endpoint, the two must be identical."}, {"load_on_startup", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED, "Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged."}, }, RPCResult{RPCResult::Type::OBJ, "", "", { - {RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to unloading the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"}, {RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to unloading the wallet.", { {RPCResult::Type::STR, "", ""}, @@ -492,13 +483,12 @@ static RPCHelpMan unloadwallet() throw JSONRPCError(RPC_MISC_ERROR, "Requested wallet already unloaded"); } } + + UnloadWallet(std::move(wallet)); + UniValue result(UniValue::VOBJ); - if (wallet->chain().rpcEnableDeprecated("walletwarningfield")) { - result.pushKV("warning", Join(warnings, Untranslated("\n")).original); - } PushWarnings(warnings, result); - UnloadWallet(std::move(wallet)); return result; }, }; |