rpc: extract wallet "warnings" fields to a util helper

This commit is contained in:
Jon Atack
2023-03-19 10:16:09 -07:00
parent f73782a903
commit 079d8cdda8
5 changed files with 18 additions and 4 deletions

View File

@@ -162,7 +162,7 @@ static RPCHelpMan createmultisig()
// Only warns if the user has explicitly chosen an address type we cannot generate
warnings.push_back("Unable to make chosen address type, please ensure no uncompressed public keys are present.");
}
if (!warnings.empty()) result.pushKV("warnings", warnings);
PushWarnings(warnings, result);
return result;
},