mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-12 09:32:33 +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,
|
isAmountEstimated: false,
|
||||||
hasRefundAddress: true,
|
hasRefundAddress: true,
|
||||||
isMoneroWallet: exchangeViewModel.isMoneroWallet,
|
isMoneroWallet: exchangeViewModel.isMoneroWallet,
|
||||||
currencies: CryptoCurrency.all,
|
currencies: exchangeViewModel.depositCurrencies,
|
||||||
onCurrencySelected: (currency) {
|
onCurrencySelected: (currency) {
|
||||||
// FIXME: need to move it into view model
|
// FIXME: need to move it into view model
|
||||||
if (currency == CryptoCurrency.xmr &&
|
if (currency == CryptoCurrency.xmr &&
|
||||||
|
|
|
@ -31,7 +31,8 @@ class ExchangeViewModel = ExchangeViewModelBase with _$ExchangeViewModel;
|
||||||
abstract class ExchangeViewModelBase with Store {
|
abstract class ExchangeViewModelBase with Store {
|
||||||
ExchangeViewModelBase(this.wallet, this.trades, this._exchangeTemplateStore,
|
ExchangeViewModelBase(this.wallet, this.trades, this._exchangeTemplateStore,
|
||||||
this.tradesStore, this._settingsStore) {
|
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()];
|
providerList = [ChangeNowExchangeProvider()];
|
||||||
_initialPairBasedOnWallet();
|
_initialPairBasedOnWallet();
|
||||||
isDepositAddressEnabled = !(depositCurrency == wallet.currency);
|
isDepositAddressEnabled = !(depositCurrency == wallet.currency);
|
||||||
|
@ -55,7 +56,10 @@ abstract class ExchangeViewModelBase with Store {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
receiveCurrencies = CryptoCurrency.all
|
receiveCurrencies = CryptoCurrency.all
|
||||||
.where((cryptoCurrency) => !excludeCurrencies.contains(cryptoCurrency))
|
.where((cryptoCurrency) => !excludeReceiveCurrencies.contains(cryptoCurrency))
|
||||||
|
.toList();
|
||||||
|
depositCurrencies = CryptoCurrency.all
|
||||||
|
.where((cryptoCurrency) => !excludeDepositCurrencies.contains(cryptoCurrency))
|
||||||
.toList();
|
.toList();
|
||||||
isReverse = false;
|
isReverse = false;
|
||||||
isFixedRateMode = false;
|
isFixedRateMode = false;
|
||||||
|
@ -131,6 +135,8 @@ abstract class ExchangeViewModelBase with Store {
|
||||||
|
|
||||||
List<CryptoCurrency> receiveCurrencies;
|
List<CryptoCurrency> receiveCurrencies;
|
||||||
|
|
||||||
|
List<CryptoCurrency> depositCurrencies;
|
||||||
|
|
||||||
Limits limits;
|
Limits limits;
|
||||||
|
|
||||||
bool isReverse;
|
bool isReverse;
|
||||||
|
|
Loading…
Reference in a new issue