From 66a8e895af43617df26ac53861117b700d4d8ec7 Mon Sep 17 00:00:00 2001 From: malik1004x Date: Sat, 22 Nov 2025 19:31:58 +0100 Subject: [PATCH] Show fiat amount for tokens on swipe confirmation sheet (#2670) * fix: fiat amount not showing for tokens on the swipe to send confirmation sheet * fix: fiat amount not showing for tokens on the swipe to send confirmation sheet --- cw_core/lib/crypto_currency.dart | 4 ++++ lib/view_model/send/send_view_model.dart | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 952d7c08a..b35531b72 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -393,4 +393,8 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen @override String toString() => title; + + bool titleAndTagEqual(CryptoCurrency other) { + return title == other.title && tag == other.tag; + } } diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 1b446e020..24f71cac4 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -191,7 +191,8 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor try { final fiat = calculateFiatAmount( - price: _fiatConversationStore.prices[selectedCryptoCurrency]!, + price: _fiatConversationStore.prices[_fiatConversationStore.prices.keys + .firstWhere((k) => k.titleAndTagEqual(selectedCryptoCurrency))], cryptoAmount: pendingTransaction!.amountFormatted); return fiat; } catch (_) {