mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-16 09:34:06 +01:00
CAKE-296 | added receiveCurrencies (list of crypto currencies without xlm and xrp) to exchange_view_model.dart; applied receiveCurrencies to receive card in the exchange_page.dart
This commit is contained in:
@@ -57,10 +57,12 @@ abstract class ExchangeViewModelBase with Store {
|
||||
_onPairChange();
|
||||
}
|
||||
});
|
||||
receiveCurrencies = CryptoCurrency.all.where((cryptoCurrency) =>
|
||||
(cryptoCurrency != CryptoCurrency.xlm)&&
|
||||
(cryptoCurrency != CryptoCurrency.xrp)).toList();
|
||||
_defineIsReceiveAmountEditable();
|
||||
isFixedRateMode = false;
|
||||
isReceiveAmountEntered = false;
|
||||
isDisabledExchangeButton = false;
|
||||
loadLimits();
|
||||
}
|
||||
|
||||
@@ -114,9 +116,6 @@ abstract class ExchangeViewModelBase with Store {
|
||||
@observable
|
||||
bool isFixedRateMode;
|
||||
|
||||
@observable
|
||||
bool isDisabledExchangeButton;
|
||||
|
||||
@computed
|
||||
SyncStatus get status => wallet.syncStatus;
|
||||
|
||||
@@ -127,6 +126,8 @@ abstract class ExchangeViewModelBase with Store {
|
||||
bool get hasAllAmount =>
|
||||
wallet.type == WalletType.bitcoin && depositCurrency == wallet.currency;
|
||||
|
||||
List<CryptoCurrency> receiveCurrencies;
|
||||
|
||||
Limits limits;
|
||||
|
||||
NumberFormat _cryptoNumberFormat;
|
||||
@@ -378,14 +379,11 @@ abstract class ExchangeViewModelBase with Store {
|
||||
_providerForPair(from: depositCurrency, to: receiveCurrency);
|
||||
|
||||
if (provider != null) {
|
||||
isDisabledExchangeButton = false;
|
||||
changeProvider(provider: provider);
|
||||
}
|
||||
} else {
|
||||
isDisabledExchangeButton = true;
|
||||
depositAmount = '';
|
||||
receiveAmount = '';
|
||||
limitsState = LimitsLoadedFailure(error: 'Pair is not exists');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user