From: tobtoht Date: Fri, 22 Oct 2021 15:55:24 +0000 (+0200) Subject: History: fiat return ? if not usd before websocket connection X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=19e8ed1b19bd3640955fada6a1d5e364d0f5cf39;p=gamesguru%2Ffeather.git History: fiat return ? if not usd before websocket connection --- diff --git a/src/model/TransactionHistoryModel.cpp b/src/model/TransactionHistoryModel.cpp index 3bec012f..c7425b0f 100644 --- a/src/model/TransactionHistoryModel.cpp +++ b/src/model/TransactionHistoryModel.cpp @@ -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));