Skip to content

Commit 39163e7

Browse files
committed
Show memo for self s->s txs
1 parent e1e376e commit 39163e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/qt/transactionrecord.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ bool TransactionRecord::decomposeSendToSelfTransaction(const CWalletTx& wtx, con
208208
// we know that all of the inputs and outputs are mine and that have shielded data.
209209
// Let's see if only have transparent inputs, so we know that this is a
210210
// transparent -> shield transaction
211+
const auto& sspkm = wallet->GetSaplingScriptPubKeyMan();
211212
if (wtx.tx->sapData->vShieldedSpend.empty()) {
212213
sub.type = TransactionRecord::SendToSelfShieldedAddress;
213214
sub.shieldedCredit = wtx.GetCredit(ISMINE_SPENDABLE_SHIELDED);
214215
nChange += wtx.GetShieldedChange();
215216

216-
const auto& sspkm = wallet->GetSaplingScriptPubKeyMan();
217217
SaplingOutPoint out(sub.hash, 0);
218218
auto opAddr = sspkm->GetOutPointAddress(wtx, out);
219219
if (opAddr) {
@@ -235,8 +235,10 @@ bool TransactionRecord::decomposeSendToSelfTransaction(const CWalletTx& wtx, con
235235
sub.shieldedCredit = wtx.GetCredit(ISMINE_SPENDABLE_TRANSPARENT);
236236
} else {
237237
// we know that the outputs are only shield, this is purely a change address tx.
238-
// show only the fee.
238+
// show only the fee and eventually the memo (that for self s->s txs is put at 0 position).
239239
sub.type = TransactionRecord::SendToSelfShieldToShieldChangeAddress;
240+
SaplingOutPoint out(sub.hash, 0);
241+
sub.memo = sspkm->GetOutPointMemo(wtx, out);
240242
}
241243
}
242244
}

0 commit comments

Comments
 (0)