Skip to content

Commit 8a49279

Browse files
knstUdjinM6
andcommitted
fix: rpc improvements for CJ derivation path
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
1 parent c821702 commit 8a49279

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/wallet/rpc/backup.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ RPCHelpMan listdescriptors()
19771977
{RPCResult::Type::NUM, "timestamp", "The creation time of the descriptor"},
19781978
{RPCResult::Type::BOOL, "active", "Whether this descriptor is currently used to generate new addresses"},
19791979
{RPCResult::Type::BOOL, "internal", /*optional=*/true, "True if this descriptor is used to generate change addresses. False if this descriptor is used to generate receiving addresses; defined only for active descriptors"},
1980-
{RPCResult::Type::BOOL, "coinjoin", /*optional=*/true, "True if this descriptor is used to generate CoinJoin addresses. False if this descriptor is used to generate receiving addresses; defined only for active descriptors"},
1980+
{RPCResult::Type::BOOL, "coinjoin", /*optional=*/true, "True if this descriptor is used to generate CoinJoin addresses. False if this descriptor is used to generate receiving addresses."},
19811981
{RPCResult::Type::ARR_FIXED, "range", /*optional=*/true, "Defined only for ranged descriptors", {
19821982
{RPCResult::Type::NUM, "", "Range start inclusive"},
19831983
{RPCResult::Type::NUM, "", "Range end inclusive"},
@@ -2041,10 +2041,7 @@ RPCHelpMan listdescriptors()
20412041
if (type != std::nullopt) {
20422042
std::string match = strprintf("/%d'/%s'/4'/0'", BIP32_PURPOSE_FEATURE, Params().ExtCoinType());
20432043
bool is_cj = descriptor.find(match) != std::string::npos;
2044-
if (is_cj) {
2045-
spk.pushKV("internal", false);
2046-
spk.pushKV("coinjoin", is_cj);
2047-
}
2044+
spk.pushKV("coinjoin", is_cj);
20482045
}
20492046
if (wallet_descriptor.descriptor->IsRange()) {
20502047
UniValue range(UniValue::VARR);

0 commit comments

Comments
 (0)