aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/addresses.cpp
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2022-05-25 15:16:22 -0300
committerbrunoerg <brunoely.gc@gmail.com>2022-06-06 09:46:02 -0300
commiteaf6f630c0190c634b5f1c85f749437f4209cc36 (patch)
treee4537b4ad64dca1681dc74b54dd74299ba7a0f5c /src/wallet/rpc/addresses.cpp
parent44037a29129a830fd9c9580f0818387756cfd7d3 (diff)
downloadbitcoin-eaf6f630c0190c634b5f1c85f749437f4209cc36.tar.xz
rpc: fix inappropriate warning for address type p2sh-segwit in createmultisig and addmultisigaddress
Diffstat (limited to 'src/wallet/rpc/addresses.cpp')
-rw-r--r--src/wallet/rpc/addresses.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpc/addresses.cpp b/src/wallet/rpc/addresses.cpp
index d5444f5051..f25ad59528 100644
--- a/src/wallet/rpc/addresses.cpp
+++ b/src/wallet/rpc/addresses.cpp
@@ -302,11 +302,11 @@ RPCHelpMan addmultisigaddress()
result.pushKV("descriptor", descriptor->ToString());
UniValue warnings(UniValue::VARR);
- if (!request.params[3].isNull() && OutputTypeFromDestination(dest) != output_type) {
+ if (descriptor->GetOutputType() != output_type) {
// 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.size()) result.pushKV("warnings", warnings);
+ if (!warnings.empty()) result.pushKV("warnings", warnings);
return result;
},