Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactiondesc.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty()) { | ||||
strHTML += | strHTML += | ||||
GUIUtil::HtmlEscape(wallet->mapAddressBook[dest].name) + " "; | GUIUtil::HtmlEscape(wallet->mapAddressBook[dest].name) + " "; | ||||
strHTML += GUIUtil::HtmlEscape(strAddress) + "<br>"; | strHTML += GUIUtil::HtmlEscape(strAddress) + "<br>"; | ||||
} | } | ||||
// | // | ||||
// Amount | // Amount | ||||
// | // | ||||
if (wtx.IsCoinBase() && nCredit == 0) { | if (wtx.IsCoinBase() && nCredit == Amount(0)) { | ||||
// | // | ||||
// Coinbase | // Coinbase | ||||
// | // | ||||
Amount nUnmatured = 0; | Amount nUnmatured(0); | ||||
for (const CTxOut &txout : wtx.tx->vout) { | for (const CTxOut &txout : wtx.tx->vout) { | ||||
nUnmatured += wallet->GetCredit(txout, ISMINE_ALL); | nUnmatured += wallet->GetCredit(txout, ISMINE_ALL); | ||||
} | } | ||||
strHTML += "<b>" + tr("Credit") + ":</b> "; | strHTML += "<b>" + tr("Credit") + ":</b> "; | ||||
if (wtx.IsInMainChain()) | if (wtx.IsInMainChain()) | ||||
strHTML += BitcoinUnits::formatHtmlWithUnit( | strHTML += BitcoinUnits::formatHtmlWithUnit( | ||||
unit, nUnmatured.GetSatoshis()) + | unit, nUnmatured.GetSatoshis()) + | ||||
" (" + tr("matures in %n more block(s)", "", | " (" + tr("matures in %n more block(s)", "", | ||||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | if (wtx.IsCoinBase() && nCredit == Amount(0)) { | ||||
"<br>"; | "<br>"; | ||||
strHTML += "<b>" + tr("Total credit") + ":</b> " + | strHTML += "<b>" + tr("Total credit") + ":</b> " + | ||||
BitcoinUnits::formatHtmlWithUnit( | BitcoinUnits::formatHtmlWithUnit( | ||||
unit, nValue.GetSatoshis()) + | unit, nValue.GetSatoshis()) + | ||||
"<br>"; | "<br>"; | ||||
} | } | ||||
Amount nTxFee = nDebit - wtx.tx->GetValueOut(); | Amount nTxFee = nDebit - wtx.tx->GetValueOut(); | ||||
if (nTxFee > 0) | if (nTxFee > Amount(0)) | ||||
strHTML += "<b>" + tr("Transaction fee") + ":</b> " + | strHTML += "<b>" + tr("Transaction fee") + ":</b> " + | ||||
BitcoinUnits::formatHtmlWithUnit( | BitcoinUnits::formatHtmlWithUnit( | ||||
unit, -nTxFee.GetSatoshis()) + | unit, -nTxFee.GetSatoshis()) + | ||||
"<br>"; | "<br>"; | ||||
} else { | } else { | ||||
// | // | ||||
// Mixed debit transaction | // Mixed debit transaction | ||||
// | // | ||||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |