fix onramper network tag plus UI (#1832)

This commit is contained in:
Serhii
2024-11-27 19:06:28 +02:00
committed by GitHub
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) {
switch (tag) {
case 'OMNI':
case 'BSC':
return tag;
case 'POL':
return 'POLYGON';
case 'ZEC':
return 'ZCASH';
default:
try {
return CryptoCurrency.fromString(tag).fullName!;
+3 -2
View File
@@ -170,8 +170,9 @@ class BuySellPage extends BasePage {
},
color: Theme.of(context).primaryColor,
textColor: Colors.white,
isDisabled: false,
isLoading: !buySellViewModel.isReadyToTrade)),
isDisabled: buySellViewModel.isBuySellQuotFailed,
isLoading: !buySellViewModel.isReadyToTrade &&
!buySellViewModel.isBuySellQuotFailed)),
]),
)),
));
+6 -1
View File
@@ -155,13 +155,18 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
final hasSelectedPaymentMethod = selectedPaymentMethod != null;
final isPaymentMethodLoaded = paymentMethodState is PaymentMethodLoaded;
final isBuySellQuotLoaded = buySellQuotState is BuySellQuotLoaded;
final isBuySellQuotFailed = buySellQuotState is BuySellQuotFailed;
return hasSelectedQuote &&
hasSelectedPaymentMethod &&
isPaymentMethodLoaded &&
isBuySellQuotLoaded;
isBuySellQuotLoaded &&
!isBuySellQuotFailed;
}
@computed
bool get isBuySellQuotFailed => buySellQuotState is BuySellQuotFailed;
@action
void reset() {
cryptoCurrency = wallet.currency;