minor fixes

This commit is contained in:
OmarHatem
2026-03-24 02:52:06 +01:00
parent a864655e2d
commit 079fb1a028
2 changed files with 6 additions and 4 deletions
@@ -146,13 +146,15 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
}
if (!fiatConversionStore.prices.containsKey(cryptoCurrency)) return "";
return (double.parse(_amount) * fiatConversionStore.prices[cryptoCurrency]!).toStringAsFixed(2);
final amount = double.tryParse(_amount) ?? 0;
return (amount * fiatConversionStore.prices[cryptoCurrency]!).toStringAsFixed(2);
}
@computed
String get selectedCurrencyFiatAmount {
if (_fiatRate == null) return "";
return (double.parse(_amount) * _fiatRate!).toStringAsFixed(2);
final amount = double.tryParse(_amount) ?? 0;
return (amount * _fiatRate!).toStringAsFixed(2);
}
@action