This commit is contained in:
Matthew Fosse 2024-04-08 10:42:27 -07:00 committed by GitHub
parent 291aa710c6
commit d4b317b3a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,7 +155,7 @@ class MoonPayProvider extends BuyProvider {
'baseCurrencyAmount': amount ?? '0', 'baseCurrencyAmount': amount ?? '0',
'currencyCode': currencyCode, 'currencyCode': currencyCode,
'walletAddress': walletAddress, 'walletAddress': walletAddress,
'lockAmount': 'true', 'lockAmount': 'false',
'showAllCurrencies': 'false', 'showAllCurrencies': 'false',
'showWalletAddressForm': 'false', 'showWalletAddressForm': 'false',
'enabledPaymentMethods': 'enabledPaymentMethods':
@ -256,7 +256,7 @@ class MoonPayProvider extends BuyProvider {
@override @override
Future<void> launchProvider(BuildContext context, bool? isBuyAction) async { Future<void> launchProvider(BuildContext context, bool? isBuyAction) async {
// try { try {
late final Uri uri; late final Uri uri;
if (isBuyAction ?? true) { if (isBuyAction ?? true) {
uri = await requestBuyMoonPayUrl( uri = await requestBuyMoonPayUrl(
@ -281,19 +281,19 @@ class MoonPayProvider extends BuyProvider {
} else { } else {
throw Exception('Could not launch URL'); throw Exception('Could not launch URL');
} }
// } catch (e) { } catch (e) {
// await showDialog<void>( await showDialog<void>(
// context: context, context: context,
// builder: (BuildContext context) { builder: (BuildContext context) {
// return AlertWithOneAction( return AlertWithOneAction(
// alertTitle: 'MoonPay', alertTitle: 'MoonPay',
// alertContent: 'The MoonPay service is currently unavailable: $e', alertContent: 'The MoonPay service is currently unavailable: $e',
// buttonText: S.of(context).ok, buttonText: S.of(context).ok,
// buttonAction: () => Navigator.of(context).pop(), buttonAction: () => Navigator.of(context).pop(),
// ); );
// }, },
// ); );
// } }
} }
String _normalizeCurrency(CryptoCurrency currency) { String _normalizeCurrency(CryptoCurrency currency) {