mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 23:17:02 +02:00
wallet, rpc: Push the normalized parent descriptor
Instead of providing the descriptor string as stored in the db, use the normalized descriptor as is done for getaddressinfo's parent_desc field.
This commit is contained in:
@ -109,7 +109,10 @@ void PushParentDescriptors(const CWallet& wallet, const CScript& script_pubkey,
|
||||
{
|
||||
UniValue parent_descs(UniValue::VARR);
|
||||
for (const auto& desc: wallet.GetWalletDescriptors(script_pubkey)) {
|
||||
parent_descs.push_back(desc.descriptor->ToString());
|
||||
std::string desc_str;
|
||||
FlatSigningProvider dummy_provider;
|
||||
if (!CHECK_NONFATAL(desc.descriptor->ToNormalizedString(dummy_provider, desc_str, &desc.cache))) continue;
|
||||
parent_descs.push_back(desc_str);
|
||||
}
|
||||
entry.pushKV("parent_descs", std::move(parent_descs));
|
||||
}
|
||||
|
Reference in New Issue
Block a user