mirror of
https://github.com/wownero/wowlet.git
synced 2026-11-18 22:24:24 +01:00
The balance fiat display does not 'round to ceiling' anymore, instead introduced some more decimals:
 New fiat columns in the history table: - Historical price (`balance * historical fiat price`) - Historical rate (the historical fiat price at that date) - Current price (`balance * current fiat price`)  When preferred fiat is changed (in the settings), the balance fiat display now follows accordingly. Requires https://git.wownero.com/wowlet/wowlet-backend/pulls/19
This commit is contained in:
+9
-1
@@ -282,6 +282,9 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
|
||||
|
||||
// settings connects
|
||||
connect(m_windowSettings, &Settings::preferredFiatCurrencyChanged, this, &MainWindow::onUpdateFiatBalanceWidget);
|
||||
connect(m_windowSettings, &Settings::preferredFiatCurrencyChanged, this, &MainWindow::onUpdateWowWidget);
|
||||
connect(m_windowSettings, &Settings::preferredFiatCurrencyChanged, this, &MainWindow::onUpdateBTCWidget);
|
||||
connect(m_windowSettings, &Settings::preferredFiatCurrencyChanged, this, &MainWindow::onUpdateXMRWidget);
|
||||
connect(m_windowSettings, &Settings::preferredFiatCurrencyChanged, m_ctx, &AppContext::onPreferredFiatCurrencyChanged);
|
||||
connect(m_windowSettings, &Settings::preferredFiatCurrencyChanged, ui->suchWowWidget, &SuchWowWidget::onPreferredFiatCurrencyChanged);
|
||||
connect(m_windowSettings, &Settings::preferredFiatCurrencyChanged, ui->sendWidget, QOverload<>::of(&SendWidget::onPreferredFiatCurrencyChanged));
|
||||
@@ -1411,7 +1414,12 @@ void MainWindow::onUpdateWowWidget() {
|
||||
}
|
||||
|
||||
auto wowObj = AppContext::prices->markets["WOW"];
|
||||
auto currencyText = Utils::amountToCurrencyString(wowObj.price_usd, fiatCurrency);
|
||||
|
||||
double amount = wowObj.price_usd;
|
||||
if(fiatCurrency != "USD")
|
||||
amount = AppContext::prices->convert("USD", fiatCurrency, amount);
|
||||
|
||||
auto currencyText = Utils::amountToCurrencyString(amount, fiatCurrency, 5);
|
||||
m_tickerWOW->setFiatText(currencyText);
|
||||
|
||||
auto pct24h = AppContext::prices->markets["WOW"].price_usd_change_pct_24h;
|
||||
|
||||
Reference in New Issue
Block a user