Skip to content

Commit

Permalink
Disable Moonpay, Paybis, and Simplex providers
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-edge committed Oct 23, 2024
1 parent 9c3c4f8 commit 90b8058
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugins/gui/providers/moonpayProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/gui/providers/paybisProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ export const paybisProvider: FiatProviderFactory = {
partnerIcon,
pluginDisplayName,
getSupportedAssets: async ({ direction, paymentTypes, regionCode }): Promise<FiatProviderAssetMap> => {
// 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)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/gui/providers/simplexProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export const simplexProvider: FiatProviderFactory = {
partnerIcon,
pluginDisplayName,
getSupportedAssets: async ({ direction, regionCode, paymentTypes }): Promise<FiatProviderAssetMap> => {
if (direction !== 'buy') {
if (direction !== 'buy' || regionCode.countryCode === 'GB') {
throw new FiatProviderError({ providerId, errorType: 'paymentUnsupported' })
}

Expand Down

0 comments on commit 90b8058

Please sign in to comment.