mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Show addresses for "SendToSelf" transactions
Change addresses are not recognized.
This commit is contained in:
@@ -93,10 +93,14 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface
|
||||
if (fAllFromMe && fAllToMe)
|
||||
{
|
||||
// Payment to self
|
||||
CAmount nChange = wtx.change;
|
||||
std::string address;
|
||||
for (auto it = wtx.txout_address.begin(); it != wtx.txout_address.end(); ++it) {
|
||||
if (it != wtx.txout_address.begin()) address += ", ";
|
||||
address += EncodeDestination(*it);
|
||||
}
|
||||
|
||||
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
|
||||
-(nDebit - nChange), nCredit - nChange));
|
||||
CAmount nChange = wtx.change;
|
||||
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, address, -(nDebit - nChange), nCredit - nChange));
|
||||
parts.last().involvesWatchAddress = involvesWatchAddress; // maybe pass to TransactionRecord as constructor argument
|
||||
}
|
||||
else if (fAllFromMe)
|
||||
|
||||
Reference in New Issue
Block a user