History: fiat return ? if not usd before websocket connection

This commit is contained in:
tobtoht 2021-10-22 17:55:24 +02:00
parent b8dbf128d2
commit 19e8ed1b19
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -181,6 +181,9 @@ QVariant TransactionHistoryModel::parseTransactionInfo(const TransactionInfo &tI
if (role == Qt::UserRole) {
return usd_amount;
}
if (usd_amount == 0.0) {
return QString("?");
}
double fiat_rounded = ceil(Utils::roundSignificant(usd_amount, 3) * 100.0) / 100.0;
return QString("%1").arg(Utils::amountToCurrencyString(fiat_rounded, preferredFiatCurrency));