The balance fiat display does not 'round to ceiling' anymore, instead introduced some more decimals:

![https://i.imgur.com/aZAonV4.png](https://i.imgur.com/aZAonV4.png)

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`)

![https://i.imgur.com/QkWCLRf.png](https://i.imgur.com/QkWCLRf.png)

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:
dsc
2022-04-25 21:56:14 +02:00
parent 73747e05a7
commit 289f9ab1d2
10 changed files with 117 additions and 23 deletions
+8
View File
@@ -334,6 +334,7 @@ void AppContext::onPreferredFiatCurrencyChanged(const QString &symbol) {
auto *model = this->currentWallet->transactionHistoryModel();
if(model != nullptr) {
model->preferredFiatSymbol = symbol;
this->currentWallet->transactionHistoryModel()->transactionHistory()->calcFiatInfo();
}
}
}
@@ -379,6 +380,13 @@ void AppContext::onWalletOpened(Wallet *wallet) {
connect(this->currentWallet, &Wallet::heightRefreshed, this, &AppContext::onHeightRefreshed);
connect(this->currentWallet, &Wallet::transactionCreated, this, &AppContext::onTransactionCreated);
this->currentWallet->historyModel(); // load historyModel
auto *txHistory = this->currentWallet->history();
txHistory->refresh(this->currentWallet->currentSubaddressAccount());
connect(AppContext::prices, &Prices::fiatPricesUpdated, txHistory, &TransactionHistory::calcFiatInfo);
connect(AppContext::prices, &Prices::cryptoPricesUpdated, txHistory, &TransactionHistory::calcFiatInfo);
emit walletOpened(wallet);
connect(this->currentWallet, &Wallet::connectionStatusChanged, [this]{