mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
feat: introduce feeFormattedValue and feeFormatted to remove string parsing in view model (#2366)
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -64,10 +64,9 @@ abstract class DEuroViewModelBase with Store {
|
||||
if (transaction != null) {
|
||||
final currency = CryptoCurrency.eth;
|
||||
return calculateFiatAmount(
|
||||
price: _fiatConversationStore.prices[currency]!,
|
||||
cryptoAmount:
|
||||
transaction!.feeFormatted.substring(0, transaction!.feeFormatted.indexOf(" ")),
|
||||
);
|
||||
price: _fiatConversationStore.prices[currency]!,
|
||||
cryptoAmount: transaction!.feeFormattedValue,
|
||||
);
|
||||
} else {
|
||||
return '0.00';
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
|
||||
final currency = pendingTransactionFeeCurrency(walletType);
|
||||
final fiat = calculateFiatAmount(
|
||||
price: _fiatConversationStore.prices[currency]!,
|
||||
cryptoAmount: pendingTransaction!.feeFormatted.substring(0, pendingTransaction!.feeFormatted.indexOf(" ")),
|
||||
cryptoAmount: pendingTransaction!.feeFormattedValue,
|
||||
);
|
||||
return fiat;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user