From 19e8ed1b19bd3640955fada6a1d5e364d0f5cf39 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 22 Oct 2021 17:55:24 +0200 Subject: [PATCH] History: fiat return ? if not usd before websocket connection --- src/model/TransactionHistoryModel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/model/TransactionHistoryModel.cpp b/src/model/TransactionHistoryModel.cpp index 3bec012..c7425b0 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));