Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactiondesc.cpp
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | if (wtx.IsCoinBase() && nCredit == Amount::zero()) { | ||||
// | // | ||||
Amount nUnmatured = Amount::zero(); | Amount nUnmatured = Amount::zero(); | ||||
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(unit, nUnmatured) + | strHTML += BitcoinUnits::formatHtmlWithUnit(unit, nUnmatured) + | ||||
" (" + tr("matures in %n more block(s)", "", | " (" + | ||||
tr("matures in %n more block(s)", "", | |||||
wtx.GetBlocksToMaturity()) + | wtx.GetBlocksToMaturity()) + | ||||
")"; | ")"; | ||||
} else { | } else { | ||||
strHTML += "(" + tr("not accepted") + ")"; | strHTML += "(" + tr("not accepted") + ")"; | ||||
} | } | ||||
strHTML += "<br>"; | strHTML += "<br>"; | ||||
} else if (nNet > Amount::zero()) { | } else if (nNet > Amount::zero()) { | ||||
// | // | ||||
// Credit | // Credit | ||||
▲ Show 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | if (gArgs.GetBoolArg("-debug", false)) { | ||||
wallet->mapAddressBook[address].name) + | wallet->mapAddressBook[address].name) + | ||||
" "; | " "; | ||||
} | } | ||||
strHTML += | strHTML += | ||||
QString::fromStdString(EncodeDestination(address)); | QString::fromStdString(EncodeDestination(address)); | ||||
} | } | ||||
strHTML = strHTML + " " + tr("Amount") + "=" + | strHTML = strHTML + " " + tr("Amount") + "=" + | ||||
BitcoinUnits::formatHtmlWithUnit(unit, vout.nValue); | BitcoinUnits::formatHtmlWithUnit(unit, vout.nValue); | ||||
strHTML = strHTML + | strHTML = | ||||
" IsMine=" + (wallet->IsMine(vout) & ISMINE_SPENDABLE | strHTML + " IsMine=" + | ||||
? tr("true") | (wallet->IsMine(vout) & ISMINE_SPENDABLE ? tr("true") | ||||
: tr("false")) + | : tr("false")) + | ||||
"</li>"; | "</li>"; | ||||
strHTML = | strHTML = | ||||
strHTML + " IsWatchOnly=" + | strHTML + " IsWatchOnly=" + | ||||
(wallet->IsMine(vout) & ISMINE_WATCH_ONLY ? tr("true") | (wallet->IsMine(vout) & ISMINE_WATCH_ONLY ? tr("true") | ||||
: tr("false")) + | : tr("false")) + | ||||
"</li>"; | "</li>"; | ||||
} | } | ||||
} | } | ||||
strHTML += "</ul>"; | strHTML += "</ul>"; | ||||
} | } | ||||
strHTML += "</font></html>"; | strHTML += "</font></html>"; | ||||
return strHTML; | return strHTML; | ||||
} | } |