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
malik1004x committed
Nov 22, 2025 at 19:31 UTC
66a8e895af43617df26ac53861117b700d4d8ec7
2 files changed
+6
-1
cw_core/lib/crypto_currency.dart
+4
@@ -393,4 +393,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
393
394
@override
395
String toString() => title;
396
+
397
+ bool titleAndTagEqual(CryptoCurrency other) {
398
+ return title == other.title && tag == other.tag;
399
+ }
400
}
lib/view_model/send/send_view_model.dart
+2
-1
@@ -191,7 +191,8 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
191
192
try {
193
final fiat = calculateFiatAmount(
194
- price: _fiatConversationStore.prices[selectedCryptoCurrency]!,
194
+ price: _fiatConversationStore.prices[_fiatConversationStore.prices.keys
195
+ .firstWhere((k) => k.titleAndTagEqual(selectedCryptoCurrency))],
196
cryptoAmount: pendingTransaction!.amountFormatted);
197
return fiat;
198
} catch (_) {