mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
fix onramper network tag plus UI (#1832)
This commit is contained in:
parent
c3978bfbe1
commit
125c40b49a
3 changed files with 12 additions and 3 deletions
|
@ -248,9 +248,12 @@ class OnRamperBuyProvider extends BuyProvider {
|
||||||
String _tagToNetwork(String tag) {
|
String _tagToNetwork(String tag) {
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case 'OMNI':
|
case 'OMNI':
|
||||||
|
case 'BSC':
|
||||||
return tag;
|
return tag;
|
||||||
case 'POL':
|
case 'POL':
|
||||||
return 'POLYGON';
|
return 'POLYGON';
|
||||||
|
case 'ZEC':
|
||||||
|
return 'ZCASH';
|
||||||
default:
|
default:
|
||||||
try {
|
try {
|
||||||
return CryptoCurrency.fromString(tag).fullName!;
|
return CryptoCurrency.fromString(tag).fullName!;
|
||||||
|
|
|
@ -170,8 +170,9 @@ class BuySellPage extends BasePage {
|
||||||
},
|
},
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
isDisabled: false,
|
isDisabled: buySellViewModel.isBuySellQuotFailed,
|
||||||
isLoading: !buySellViewModel.isReadyToTrade)),
|
isLoading: !buySellViewModel.isReadyToTrade &&
|
||||||
|
!buySellViewModel.isBuySellQuotFailed)),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
));
|
));
|
||||||
|
|
|
@ -155,13 +155,18 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
|
||||||
final hasSelectedPaymentMethod = selectedPaymentMethod != null;
|
final hasSelectedPaymentMethod = selectedPaymentMethod != null;
|
||||||
final isPaymentMethodLoaded = paymentMethodState is PaymentMethodLoaded;
|
final isPaymentMethodLoaded = paymentMethodState is PaymentMethodLoaded;
|
||||||
final isBuySellQuotLoaded = buySellQuotState is BuySellQuotLoaded;
|
final isBuySellQuotLoaded = buySellQuotState is BuySellQuotLoaded;
|
||||||
|
final isBuySellQuotFailed = buySellQuotState is BuySellQuotFailed;
|
||||||
|
|
||||||
return hasSelectedQuote &&
|
return hasSelectedQuote &&
|
||||||
hasSelectedPaymentMethod &&
|
hasSelectedPaymentMethod &&
|
||||||
isPaymentMethodLoaded &&
|
isPaymentMethodLoaded &&
|
||||||
isBuySellQuotLoaded;
|
isBuySellQuotLoaded &&
|
||||||
|
!isBuySellQuotFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@computed
|
||||||
|
bool get isBuySellQuotFailed => buySellQuotState is BuySellQuotFailed;
|
||||||
|
|
||||||
@action
|
@action
|
||||||
void reset() {
|
void reset() {
|
||||||
cryptoCurrency = wallet.currency;
|
cryptoCurrency = wallet.currency;
|
||||||
|
|
Loading…
Reference in a new issue