diff --git a/src/components/AddMoney/consts/index.ts b/src/components/AddMoney/consts/index.ts index 84622879a..30959e98a 100644 --- a/src/components/AddMoney/consts/index.ts +++ b/src/components/AddMoney/consts/index.ts @@ -2540,7 +2540,26 @@ export const ALL_COUNTRIES_ALPHA3_TO_ALPHA2: { [key: string]: string } = { ...MANTECA_ALPHA3_TO_ALPHA2, } -const enabledBankWithdrawCountries = new Set([...Object.values(BRIDGE_ALPHA3_TO_ALPHA2), 'US', 'MX', 'AR']) +// identify sepa corridors where local currency is not eur and disable them temporarily for bank withdrawals +// this impacts withdraw and claim-to-bank flows (but not add-money from bank) +export const NON_EUR_SEPA_ALPHA2 = new Set( + countryData + .filter( + (c) => + c.type === 'country' && + !!c.iso3 && + BRIDGE_ALPHA3_TO_ALPHA2[c.iso3] && + // exclude usa explicitly; bridge map includes it but it's not sepa + c.iso3 !== 'USA' + ) + .map((c) => ({ alpha2: BRIDGE_ALPHA3_TO_ALPHA2[c.iso3!], currency: c.currency })) + .filter((x) => x.alpha2 && x.currency && x.currency !== 'EUR') + .map((x) => x.alpha2 as string) +) + +const enabledBankWithdrawCountries = new Set( + [...Object.values(BRIDGE_ALPHA3_TO_ALPHA2), 'US', 'MX', 'AR'].filter((code) => !NON_EUR_SEPA_ALPHA2.has(code)) +) const enabledBankDepositCountries = new Set([...Object.values(BRIDGE_ALPHA3_TO_ALPHA2), 'US', 'MX', 'AR']) diff --git a/src/components/Common/CountryList.tsx b/src/components/Common/CountryList.tsx index 56a019537..47f0f516c 100644 --- a/src/components/Common/CountryList.tsx +++ b/src/components/Common/CountryList.tsx @@ -5,6 +5,7 @@ import { countryData, MantecaSupportedExchanges, ALL_COUNTRIES_ALPHA3_TO_ALPHA2, + NON_EUR_SEPA_ALPHA2, } from '@/components/AddMoney/consts' import EmptyState from '@/components/Global/EmptyStates/EmptyState' import { SearchInput } from '@/components/SearchInput' @@ -158,8 +159,11 @@ export const CountryList = ({ // withdraw isSupported = true } else if (viewMode === 'claim-request') { - // support all bridge and manteca supported countries - isSupported = isBridgeSupportedCountry || isMantecaSupportedCountry + // support bridge or manteca supported countries, but temporarily disable sepa corridors + // where local currency is not eur (show as soon) + const isDisabledNonEurSepa = NON_EUR_SEPA_ALPHA2.has(twoLetterCountryCode.toUpperCase()) + const isBridgeAndNotDisabled = isBridgeSupportedCountry && !isDisabledNonEurSepa + isSupported = isBridgeAndNotDisabled || isMantecaSupportedCountry } else { // support all countries isSupported = true