mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
Merge pull request #110 from cake-tech/CAKE-296-remove-xmr-to-xrp-and-xmr-to-xlm-exchange-pairs
Cake 296 remove xmr to xrp and xmr to xlm exchange pairs
This commit is contained in:
commit
b32418d9e8
2 changed files with 11 additions and 7 deletions
|
@ -248,7 +248,8 @@ class ExchangePage extends BasePage {
|
||||||
exchangeViewModel
|
exchangeViewModel
|
||||||
.isReceiveAddressEnabled,
|
.isReceiveAddressEnabled,
|
||||||
isAmountEstimated: true,
|
isAmountEstimated: true,
|
||||||
currencies: CryptoCurrency.all,
|
currencies:
|
||||||
|
exchangeViewModel.receiveCurrencies,
|
||||||
onCurrencySelected: (currency) =>
|
onCurrencySelected: (currency) =>
|
||||||
exchangeViewModel
|
exchangeViewModel
|
||||||
.changeReceiveCurrency(
|
.changeReceiveCurrency(
|
||||||
|
|
|
@ -57,6 +57,9 @@ abstract class ExchangeViewModelBase with Store {
|
||||||
_onPairChange();
|
_onPairChange();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
receiveCurrencies = CryptoCurrency.all.where((cryptoCurrency) =>
|
||||||
|
(cryptoCurrency != CryptoCurrency.xlm)&&
|
||||||
|
(cryptoCurrency != CryptoCurrency.xrp)).toList();
|
||||||
_defineIsReceiveAmountEditable();
|
_defineIsReceiveAmountEditable();
|
||||||
isFixedRateMode = false;
|
isFixedRateMode = false;
|
||||||
isReceiveAmountEntered = false;
|
isReceiveAmountEntered = false;
|
||||||
|
@ -123,6 +126,8 @@ abstract class ExchangeViewModelBase with Store {
|
||||||
bool get hasAllAmount =>
|
bool get hasAllAmount =>
|
||||||
wallet.type == WalletType.bitcoin && depositCurrency == wallet.currency;
|
wallet.type == WalletType.bitcoin && depositCurrency == wallet.currency;
|
||||||
|
|
||||||
|
List<CryptoCurrency> receiveCurrencies;
|
||||||
|
|
||||||
Limits limits;
|
Limits limits;
|
||||||
|
|
||||||
NumberFormat _cryptoNumberFormat;
|
NumberFormat _cryptoNumberFormat;
|
||||||
|
@ -369,19 +374,17 @@ abstract class ExchangeViewModelBase with Store {
|
||||||
pair.from == depositCurrency && pair.to == receiveCurrency)
|
pair.from == depositCurrency && pair.to == receiveCurrency)
|
||||||
.isNotEmpty;
|
.isNotEmpty;
|
||||||
|
|
||||||
if (!isPairExist) {
|
if (isPairExist) {
|
||||||
final provider =
|
final provider =
|
||||||
_providerForPair(from: depositCurrency, to: receiveCurrency);
|
_providerForPair(from: depositCurrency, to: receiveCurrency);
|
||||||
|
|
||||||
if (provider != null) {
|
if (provider != null) {
|
||||||
changeProvider(provider: provider);
|
changeProvider(provider: provider);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
|
||||||
_defineIsReceiveAmountEditable();
|
|
||||||
depositAmount = '';
|
depositAmount = '';
|
||||||
receiveAmount = '';
|
receiveAmount = '';
|
||||||
loadLimits();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExchangeProvider _providerForPair({CryptoCurrency from, CryptoCurrency to}) {
|
ExchangeProvider _providerForPair({CryptoCurrency from, CryptoCurrency to}) {
|
||||||
|
|
Loading…
Reference in a new issue