]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
History: fiat return ? if not usd before websocket connection
authortobtoht <thotbot@protonmail.com>
Fri, 22 Oct 2021 15:55:24 +0000 (17:55 +0200)
committertobtoht <thotbot@protonmail.com>
Fri, 22 Oct 2021 15:55:24 +0000 (17:55 +0200)
src/model/TransactionHistoryModel.cpp

index 3bec012f4947e7d11a998d82c880c0d19e805148..c7425b0fbe6d79bbfa36053af788ea5a27169af7 100644 (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));