diff --git a/app/src/components/homescreen/IdCardRevealed.tsx b/app/src/components/homescreen/IdCardRevealed.tsx index dc3fa7078..d977abfa5 100644 --- a/app/src/components/homescreen/IdCardRevealed.tsx +++ b/app/src/components/homescreen/IdCardRevealed.tsx @@ -8,6 +8,7 @@ import { Dimensions } from 'react-native'; import { Separator, Text, XStack, YStack } from 'tamagui'; import type { AadhaarData } from '@selfxyz/common'; +import { commonNames } from '@selfxyz/common/constants'; import type { PassportData } from '@selfxyz/common/types/passport'; import { isAadhaarDocument, isMRZDocument } from '@selfxyz/common/utils/types'; import { @@ -37,6 +38,17 @@ const logoSvg = ` `; +/** + * Resolve a 3-letter country code to its full country name. + * Falls back to the code itself if no mapping exists. + */ +const getCountryName = (code: string): string => { + if (!code) return ''; + const cleaned = code.toUpperCase().replace(/)[cleaned] || cleaned; +}; + interface IdCardRevealedProps { idDocument: PassportData | AadhaarData; } @@ -237,7 +249,7 @@ const IdCardRevealed: FC = ({ idDocument }) => { @@ -257,7 +269,7 @@ const IdCardRevealed: FC = ({ idDocument }) => {