Skip to content

Commit

Permalink
QT: get fee directly from elementsmode transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Apr 11, 2019
1 parent a337b76 commit 6333166
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/qt/bitcoinunits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ QString BitcoinUnits::shortName(int unit)
{
switch(unit)
{
case uBTC: return QString::fromUtf8("bits");
case SAT: return QString("sat");
case uBTC: return QString::fromUtf8("L-bits");
case SAT: return QString("L-sat");
default: return longName(unit);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/qt/transactiondesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall
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)
strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>";
}
Expand Down

0 comments on commit 6333166

Please sign in to comment.