mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Exclude xhv from exchange currencies list
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user