QT: get fee directly from elementsmode transactions

This commit is contained in:
Gregory Sanders 2019-04-11 07:34:44 -04:00
parent a337b76346
commit 6333166320
2 changed files with 3 additions and 3 deletions

View file

@ -54,8 +54,8 @@ QString BitcoinUnits::shortName(int unit)
{ {
switch(unit) switch(unit)
{ {
case uBTC: return QString::fromUtf8("bits"); case uBTC: return QString::fromUtf8("L-bits");
case SAT: return QString("sat"); case SAT: return QString("L-sat");
default: return longName(unit); default: return longName(unit);
} }
} }

View file

@ -213,7 +213,7 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall
strHTML += "<b>" + tr("Total credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nValue) + "<br>"; strHTML += "<b>" + tr("Total credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nValue) + "<br>";
} }
CAmount nTxFee = nDebit - valueFor(wtx.tx->GetValueOutMap(), ::policyAsset); CAmount nTxFee = GetFeeMap(*wtx.tx)[::policyAsset];
if (nTxFee > 0) if (nTxFee > 0)
strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>"; strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>";
} }