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 (_) {