From c2b76c7fbcc7f04930dc6254489692edd7023681 Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Sun, 24 Mar 2024 11:22:52 +0000 Subject: [PATCH] Namecoin / Qt: don't hide name ops sent to change addresses This particularly matters because the name_new RPC method sends to a change address by default, so if you issued a name_new, it would never show up in the Transactions tab. --- src/qt/transactionrecord.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 750444bdd5..1daece4d07 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -128,6 +128,14 @@ QList TransactionRecord::decomposeTransaction(const interface // Change is only really possible if we're the sender // Otherwise, someone just sent bitcoins to a change address, which should be shown if (wtx.txout_is_change[i]) { + // Name credits sent to change addresses should not be skipped + if (nNameCredit && CNameScript::isNameScript(txout.scriptPubKey)) { + nameSub.debit = nNet; + nameSub.idx = i; + nameSub.involvesWatchAddress = involvesWatchAddress; + parts.append(nameSub); + } + continue; }