diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -93,11 +93,19 @@ if (fAllFromMe && fAllToMe) { // Payment to self + std::string address; + for (auto it = wtx.txout_address.begin(); + it != wtx.txout_address.end(); ++it) { + if (it != wtx.txout_address.begin()) { + address += ", "; + } + address += EncodeCashAddr(*it, Params()); + } Amount nChange = wtx.change; - parts.append(TransactionRecord( - txid, nTime, TransactionRecord::SendToSelf, "", - -1 * (nDebit - nChange), (nCredit - nChange))); + txid, nTime, TransactionRecord::SendToSelf, address, + -(nDebit - nChange), nCredit - nChange)); + // maybe pass to TransactionRecord as constructor argument parts.last().involvesWatchAddress = involvesWatchAddress; } else if (fAllFromMe) { diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -390,6 +390,7 @@ case TransactionRecord::SendToOther: return QString::fromStdString(wtx->address) + watchAddress; case TransactionRecord::SendToSelf: + return lookupAddress(wtx->address, tooltip) + watchAddress; default: return tr("(n/a)") + watchAddress; }