Fixed overview USD balance total
@@ -133,7 +133,7 @@ OverviewPage::~OverviewPage()
void OverviewPage::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance)
{
int unit = model->getOptionsModel()->getDisplayUnit();
- int unitUSD = BitcoinUnits::USD;
+ //int unitUSD = BitcoinUnits::USD;
int unitdBTC = BitcoinUnits::dBTC;
currentBalance = balance;
currentStake = stake;
@@ -144,7 +144,13 @@ void OverviewPage::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBa
ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance));
ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance));
ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + stake + unconfirmedBalance + immatureBalance));
- ui->labelUSDTotal->setText(BitcoinUnits::formatWithUnit(unitUSD, dollarg.toDouble() * (balance + stake + unconfirmedBalance + immatureBalance)));
+ //ui->labelUSDTotal->setText(BitcoinUnits::formatWithUnit(unitUSD, dollarg.toDouble() * (balance + stake + unconfirmedBalance + immatureBalance)));
+
+ QString total;
+ double dollarg2 = (dollarg.toDouble() * (balance + stake + unconfirmedBalance + immatureBalance) / 100000000);
+ total = QString::number(dollarg2, 'f', 2);
+ ui->labelUSDTotal->setText("$" + total + " USD");
+
ui->labelBTCTotal->setText(BitcoinUnits::formatWithUnit(unitdBTC, bitcoing.toDouble() * (balance + stake + unconfirmedBalance + immatureBalance)));
ui->labelTradeLink->setTextFormat(Qt::RichText);
ui->labelTradeLink->setTextInteractionFlags(Qt::TextBrowserInteraction);
