From 90b805818071c10a69470408ad895f4d8919ca46 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Tue, 22 Oct 2024 18:28:09 -0700 Subject: [PATCH] Disable Moonpay, Paybis, and Simplex providers --- src/plugins/gui/providers/moonpayProvider.ts | 2 +- src/plugins/gui/providers/paybisProvider.ts | 4 ++-- src/plugins/gui/providers/simplexProvider.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/gui/providers/moonpayProvider.ts b/src/plugins/gui/providers/moonpayProvider.ts index 1d53724e5ba..255326388c9 100644 --- a/src/plugins/gui/providers/moonpayProvider.ts +++ b/src/plugins/gui/providers/moonpayProvider.ts @@ -203,7 +203,7 @@ export const moonpayProvider: FiatProviderFactory = { // Return nothing if paymentTypes are not supported by this provider const assetMap = allowedCurrencyCodes[direction][paymentType] - if (assetMap == null) throw new FiatProviderError({ providerId, errorType: 'paymentUnsupported' }) + if (assetMap == null || regionCode.countryCode === 'GB') throw new FiatProviderError({ providerId, errorType: 'paymentUnsupported' }) if (Object.keys(assetMap.crypto).length === 0 || isDailyCheckDue(lastChecked)) { const response = await fetch(`https://api.moonpay.com/v3/currencies?apiKey=${apiKey}`).catch(e => undefined) diff --git a/src/plugins/gui/providers/paybisProvider.ts b/src/plugins/gui/providers/paybisProvider.ts index 9059aef6ed5..b0c93f808f9 100644 --- a/src/plugins/gui/providers/paybisProvider.ts +++ b/src/plugins/gui/providers/paybisProvider.ts @@ -350,8 +350,8 @@ export const paybisProvider: FiatProviderFactory = { partnerIcon, pluginDisplayName, getSupportedAssets: async ({ direction, paymentTypes, regionCode }): Promise => { - // Do not allow sell to debit in US - if (direction === 'sell' && paymentTypes.includes('credit') && regionCode.countryCode === 'US') { + // Do not allow sell to debit in US, disable all UK + if (regionCode.countryCode === 'GB' || (direction === 'sell' && paymentTypes.includes('credit') && regionCode.countryCode === 'US')) { throw new FiatProviderError({ providerId, errorType: 'paymentUnsupported' }) } validateRegion(providerId, regionCode, SUPPORTED_REGIONS) diff --git a/src/plugins/gui/providers/simplexProvider.ts b/src/plugins/gui/providers/simplexProvider.ts index bfcd3c1b48d..259cd5c9628 100644 --- a/src/plugins/gui/providers/simplexProvider.ts +++ b/src/plugins/gui/providers/simplexProvider.ts @@ -200,7 +200,7 @@ export const simplexProvider: FiatProviderFactory = { partnerIcon, pluginDisplayName, getSupportedAssets: async ({ direction, regionCode, paymentTypes }): Promise => { - if (direction !== 'buy') { + if (direction !== 'buy' || regionCode.countryCode === 'GB') { throw new FiatProviderError({ providerId, errorType: 'paymentUnsupported' }) }