aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/wallet.cpp
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2023-05-25 16:05:52 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2023-06-04 23:53:26 +0200
commita00ae31fccba63d5fd409ffb39c1622df2ea3e8c (patch)
tree3572587c3a42b5c24031dd433dabdc6c694810ef /src/wallet/rpc/wallet.cpp
parent7f2019755d147e7e17c54f0bb61296211bb45262 (diff)
downloadbitcoin-a00ae31fccba63d5fd409ffb39c1622df2ea3e8c.tar.xz
rpc: remove deprecated "warning" field from {create,load,restore,unload}wallet
Co-authored-by: Jon Atack <jon@atack.com>
Diffstat (limited to 'src/wallet/rpc/wallet.cpp')
-rw-r--r--src/wallet/rpc/wallet.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp
index e0f246e2f2..2c25bfdd8f 100644
--- a/src/wallet/rpc/wallet.cpp
+++ b/src/wallet/rpc/wallet.cpp
@@ -219,7 +219,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, "", ""},
@@ -256,9 +255,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;
@@ -354,7 +350,6 @@ 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::STR, "", ""},
@@ -428,9 +423,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;
@@ -448,7 +440,6 @@ static RPCHelpMan unloadwallet()
{"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, "", ""},
@@ -490,13 +481,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;
},
};