mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
QT: remove GetAmounts calls or put behind bitcoind mode only
This commit is contained in:
parent
17229bfb8c
commit
5622a838c2
1 changed files with 5 additions and 4 deletions
|
|
@ -172,8 +172,9 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall
|
|||
// Debit
|
||||
//
|
||||
auto mine = wtx.txout_is_mine.begin();
|
||||
for (const CTxOut& txout : wtx.tx->vout)
|
||||
for (unsigned int i = 0; i < wtx.tx->vout.size(); ++i)
|
||||
{
|
||||
const CTxOut& txout = wtx.tx->vout[i];
|
||||
// Ignore change
|
||||
isminetype toSelf = *(mine++);
|
||||
if ((toSelf == ISMINE_SPENDABLE) && (fAllFromMe == ISMINE_SPENDABLE))
|
||||
|
|
@ -199,9 +200,9 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall
|
|||
}
|
||||
}
|
||||
|
||||
strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -txout.nValue.GetAmount()) + "<br>";
|
||||
strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wtx.txout_amounts[i]) + "<br>";
|
||||
if(toSelf)
|
||||
strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, txout.nValue.GetAmount()) + "<br>";
|
||||
strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wtx.txout_amounts[i]) + "<br>";
|
||||
}
|
||||
|
||||
if (fAllToMe)
|
||||
|
|
@ -281,7 +282,7 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall
|
|||
//
|
||||
// Debug view
|
||||
//
|
||||
if (node.getLogCategories() != BCLog::NONE)
|
||||
if (node.getLogCategories() != BCLog::NONE && !g_con_elementsmode)
|
||||
{
|
||||
strHTML += "<hr><br>" + tr("Debug information") + "<br><br>";
|
||||
for (const CTxIn& txin : wtx.tx->vin)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue