mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-21 09:08:41 +02: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:
+3
-3
@@ -418,14 +418,14 @@ double Utils::roundUp(double value, int decimal_places) {
|
||||
return std::ceil(value * multiplier) / multiplier;
|
||||
}
|
||||
|
||||
QString Utils::amountToCurrencyString(double amount, const QString ¤cyCode) {
|
||||
QString Utils::amountToCurrencyString(double amount, const QString ¤cyCode, int precision) {
|
||||
QLocale locale = getCurrencyLocale(currencyCode);
|
||||
|
||||
// \xC2\xA0 = UTF-8 non-breaking space, it looks off.
|
||||
if (currencyCode == "USD")
|
||||
return locale.toCurrencyString(amount, "$").remove("\xC2\xA0");
|
||||
return locale.toCurrencyString(amount, "$", precision).remove("\xC2\xA0");
|
||||
|
||||
return locale.toCurrencyString(amount).remove("\xC2\xA0");
|
||||
return locale.toCurrencyString(amount, nullptr, precision).remove("\xC2\xA0");
|
||||
}
|
||||
|
||||
int Utils::maxLength(const QVector<QString> &array) {
|
||||
|
||||
Reference in New Issue
Block a user