mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Exclude xhv from exchange currencies list
This commit is contained in:
parent
edb2ae42f0
commit
718ef91749
2 changed files with 9 additions and 3 deletions
|
@ -202,7 +202,7 @@ class ExchangePage extends BasePage {
|
|||
isAmountEstimated: false,
|
||||
hasRefundAddress: true,
|
||||
isMoneroWallet: exchangeViewModel.isMoneroWallet,
|
||||
currencies: CryptoCurrency.all,
|
||||
currencies: exchangeViewModel.depositCurrencies,
|
||||
onCurrencySelected: (currency) {
|
||||
// FIXME: need to move it into view model
|
||||
if (currency == CryptoCurrency.xmr &&
|
||||
|
|
|
@ -31,7 +31,8 @@ class ExchangeViewModel = ExchangeViewModelBase with _$ExchangeViewModel;
|
|||
abstract class ExchangeViewModelBase with Store {
|
||||
ExchangeViewModelBase(this.wallet, this.trades, this._exchangeTemplateStore,
|
||||
this.tradesStore, this._settingsStore) {
|
||||
const excludeCurrencies = [CryptoCurrency.xlm, CryptoCurrency.xrp, CryptoCurrency.bnb];
|
||||
const excludeDepositCurrencies = [CryptoCurrency.xhv];
|
||||
const excludeReceiveCurrencies = [CryptoCurrency.xlm, CryptoCurrency.xrp, CryptoCurrency.bnb, CryptoCurrency.xhv];
|
||||
providerList = [ChangeNowExchangeProvider()];
|
||||
_initialPairBasedOnWallet();
|
||||
isDepositAddressEnabled = !(depositCurrency == wallet.currency);
|
||||
|
@ -55,7 +56,10 @@ abstract class ExchangeViewModelBase with Store {
|
|||
}
|
||||
});
|
||||
receiveCurrencies = CryptoCurrency.all
|
||||
.where((cryptoCurrency) => !excludeCurrencies.contains(cryptoCurrency))
|
||||
.where((cryptoCurrency) => !excludeReceiveCurrencies.contains(cryptoCurrency))
|
||||
.toList();
|
||||
depositCurrencies = CryptoCurrency.all
|
||||
.where((cryptoCurrency) => !excludeDepositCurrencies.contains(cryptoCurrency))
|
||||
.toList();
|
||||
isReverse = false;
|
||||
isFixedRateMode = false;
|
||||
|
@ -131,6 +135,8 @@ abstract class ExchangeViewModelBase with Store {
|
|||
|
||||
List<CryptoCurrency> receiveCurrencies;
|
||||
|
||||
List<CryptoCurrency> depositCurrencies;
|
||||
|
||||
Limits limits;
|
||||
|
||||
bool isReverse;
|
||||
|
|
Loading…
Reference in a new issue