Exclude xhv from exchange currencies list

This commit is contained in:
M 2022-04-01 14:31:05 +01:00
parent edb2ae42f0
commit 718ef91749
2 changed files with 9 additions and 3 deletions

View file

@ -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 &&

View file

@ -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;