Skip to content

Commit 6d44917

Browse files
committed
wallet, rpc: Push the normalized parent descriptor
Instead of prividing the descriptor string as stored in the db, use the normalized descriptor as is done for getaddressinfo's parent_desc field.
1 parent f30063b commit 6d44917

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/wallet/rpc/util.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ void PushParentDescriptors(const CWallet& wallet, const CScript& script_pubkey,
109109
{
110110
UniValue parent_descs(UniValue::VARR);
111111
for (const auto& desc: wallet.GetWalletDescriptors(script_pubkey)) {
112-
parent_descs.push_back(desc.descriptor->ToString());
112+
std::string desc_str;
113+
FlatSigningProvider provider;
114+
if (!CHECK_NONFATAL(desc.descriptor->ToNormalizedString(provider, desc_str, &desc.cache))) continue;
115+
parent_descs.push_back(desc_str);
113116
}
114117
entry.pushKV("parent_descs", std::move(parent_descs));
115118
}

0 commit comments

Comments
 (0)