Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.cpp
Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | if (nNet > Amount::zero() || wtx.is_coinbase) { | ||||
} | } | ||||
if (fAllToMe > mine) { | if (fAllToMe > mine) { | ||||
fAllToMe = mine; | fAllToMe = mine; | ||||
} | } | ||||
} | } | ||||
if (fAllFromMe && fAllToMe) { | if (fAllFromMe && fAllToMe) { | ||||
// Payment to self | // 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; | Amount nChange = wtx.change; | ||||
parts.append(TransactionRecord( | parts.append(TransactionRecord( | ||||
txid, nTime, TransactionRecord::SendToSelf, "", | txid, nTime, TransactionRecord::SendToSelf, address, | ||||
-1 * (nDebit - nChange), (nCredit - nChange))); | -(nDebit - nChange), nCredit - nChange)); | ||||
// maybe pass to TransactionRecord as constructor argument | // maybe pass to TransactionRecord as constructor argument | ||||
parts.last().involvesWatchAddress = involvesWatchAddress; | parts.last().involvesWatchAddress = involvesWatchAddress; | ||||
} else if (fAllFromMe) { | } else if (fAllFromMe) { | ||||
// | // | ||||
// Debit | // Debit | ||||
// | // | ||||
Amount nTxFee = nDebit - wtx.tx->GetValueOut(); | Amount nTxFee = nDebit - wtx.tx->GetValueOut(); | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |