rpc: remove deprecated "warning" field from {create,load,restore,unload}wallet

Co-authored-by: Jon Atack <jon@atack.com>
This commit is contained in:
Sebastian Falbesoner
2023-05-25 16:05:52 +02:00
parent 7f2019755d
commit a00ae31fcc
3 changed files with 4 additions and 27 deletions

View File

@@ -1909,7 +1909,6 @@ 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::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;