From 67a0bc599ded27636212aca4a42176a602e465ad Mon Sep 17 00:00:00 2001 From: Zishan Mohd Date: Thu, 28 Aug 2025 19:12:51 +0530 Subject: [PATCH 1/2] fix: add missing countries --- src/components/Common/CountryList.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/Common/CountryList.tsx b/src/components/Common/CountryList.tsx index e958a055a1..b3a18f032e 100644 --- a/src/components/Common/CountryList.tsx +++ b/src/components/Common/CountryList.tsx @@ -9,6 +9,7 @@ import { getCardPosition } from '../Global/Card' import { useGeoLocaion } from '@/hooks/useGeoLocaion' import { CountryListSkeleton } from './CountryListSkeleton' import AvatarWithBadge from '../Profile/AvatarWithBadge' +import StatusBadge from '../Global/Badges/StatusBadge' interface CountryListViewProps { inputTitle: string @@ -34,17 +35,10 @@ export const CountryList = ({ inputTitle, viewMode, onCountryClick, onCryptoClic const { countryCode: userGeoLocationCountryCode, isLoading: isGeoLoading } = useGeoLocaion() const supportedCountries = useMemo(() => { - // if it's a claim or request flow, we only show SEPA countries and US/MX - if (viewMode === 'claim-request') { - const sepaCountries = Object.keys(countryCodeMap) - const supported = new Set([...sepaCountries, 'US', 'MX']) - - return countryData.filter((country) => country.type === 'country' && supported.has(country.id)) - } - // if it's an add or withdraw flow, we show all countries return countryData.filter((country) => country.type === 'country') }, [viewMode]) + // sort countries based on user's geo location, fallback to alphabetical order // sort countries based on user's geo location, fallback to alphabetical order const sortedCountries = useMemo(() => { if (isGeoLoading) return [] @@ -112,13 +106,20 @@ export const CountryList = ({ inputTitle, viewMode, onCountryClick, onCryptoClic const twoLetterCountryCode = countryCodeMap[country.id.toUpperCase()] ?? country.id.toLowerCase() const position = getCardPosition(index, filteredCountries.length) + const isSupported = + viewMode === 'add-withdraw' || + ['US', 'MX', ...Object.keys(countryCodeMap), ...Object.values(countryCodeMap)].includes( + country.id + ) return ( } description={country.currency} onClick={() => onCountryClick(country)} position={position} + isDisabled={!isSupported} leftIcon={
Date: Thu, 28 Aug 2025 19:14:46 +0530 Subject: [PATCH 2/2] remove duplicate comment --- src/components/Common/CountryList.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Common/CountryList.tsx b/src/components/Common/CountryList.tsx index b3a18f032e..970b3f7eef 100644 --- a/src/components/Common/CountryList.tsx +++ b/src/components/Common/CountryList.tsx @@ -38,7 +38,6 @@ export const CountryList = ({ inputTitle, viewMode, onCountryClick, onCryptoClic return countryData.filter((country) => country.type === 'country') }, [viewMode]) - // sort countries based on user's geo location, fallback to alphabetical order // sort countries based on user's geo location, fallback to alphabetical order const sortedCountries = useMemo(() => { if (isGeoLoading) return []