mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
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
This commit is contained in:
@@ -393,4 +393,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
|
||||
|
||||
@override
|
||||
String toString() => title;
|
||||
|
||||
bool titleAndTagEqual(CryptoCurrency other) {
|
||||
return title == other.title && tag == other.tag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 (_) {
|
||||
|
||||
Reference in New Issue
Block a user