mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-30 08:49:29 +02:00
rpc: extract wallet "warnings" fields to a util helper
This commit is contained in:
@@ -1225,7 +1225,7 @@ static UniValue ProcessImport(CWallet& wallet, const UniValue& data, const int64
|
||||
|
||||
result.pushKV("error", JSONRPCError(RPC_MISC_ERROR, "Missing required fields"));
|
||||
}
|
||||
if (warnings.size()) result.pushKV("warnings", warnings);
|
||||
PushWarnings(warnings, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1579,7 +1579,7 @@ static UniValue ProcessDescriptorImport(CWallet& wallet, const UniValue& data, c
|
||||
result.pushKV("success", UniValue(false));
|
||||
result.pushKV("error", e);
|
||||
}
|
||||
if (warnings.size()) result.pushKV("warnings", warnings);
|
||||
PushWarnings(warnings, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user