mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
move logic to viewmodels
This commit is contained in:
@@ -72,6 +72,18 @@ abstract class ExchangeTradeViewModelBase with Store {
|
||||
? '\n\n' + S.current.xrp_extra_info
|
||||
: '';
|
||||
|
||||
@computed
|
||||
String get pendingTransactionFiatAmountValueFormatted =>
|
||||
sendViewModel.balanceViewModel.disableFiat
|
||||
? '' : sendViewModel.pendingTransactionFiatAmount
|
||||
+ ' ' + sendViewModel.fiat.title;
|
||||
|
||||
@computed
|
||||
String get pendingTransactionFeeFiatAmountFormatted =>
|
||||
sendViewModel.balanceViewModel.disableFiat
|
||||
? '' : sendViewModel.pendingTransactionFeeFiatAmount
|
||||
+ ' ' + sendViewModel.fiat.title;
|
||||
|
||||
@observable
|
||||
ObservableList<ExchangeTradeItem> items;
|
||||
|
||||
|
||||
@@ -139,6 +139,16 @@ abstract class SendViewModelBase with Store {
|
||||
@computed
|
||||
String get balance => balanceViewModel.availableBalance ?? '0.0';
|
||||
|
||||
@computed
|
||||
String get pendingTransactionFiatAmountFormatted =>
|
||||
balanceViewModel.disableFiat ? '' : pendingTransactionFiatAmount +
|
||||
' ' + fiat.title;
|
||||
|
||||
@computed
|
||||
String get pendingTransactionFeeFiatAmountFormatted =>
|
||||
balanceViewModel.disableFiat ? '' : pendingTransactionFeeFiatAmount +
|
||||
' ' + fiat.title;
|
||||
|
||||
@computed
|
||||
bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user