diff --git a/src/handlers/deeplinks.ts b/src/handlers/deeplinks.ts index d7bff1130b3..cd60a07873b 100644 --- a/src/handlers/deeplinks.ts +++ b/src/handlers/deeplinks.ts @@ -199,7 +199,7 @@ export default async function handleDeeplink( } default: { - const addressOrENS = pathname?.split('/')?.[1]; + const addressOrENS = pathname?.split('/profile/')?.[1]; /** * This handles ENS profile links on mobile i.e. diff --git a/src/hooks/useScanner.ts b/src/hooks/useScanner.ts index 0324ca4e528..68fe45c436b 100644 --- a/src/hooks/useScanner.ts +++ b/src/hooks/useScanner.ts @@ -89,7 +89,7 @@ export default function useScanner(enabled: boolean, onSuccess: () => unknown) { analytics.track('Scanned Rainbow profile url'); const urlObj = new URL(url); - const addressOrENS = urlObj.pathname?.split('/')?.[1] || ''; + const addressOrENS = urlObj.pathname?.split('/profile/')?.[1] || ''; const isValid = await checkIsValidAddressOrDomain(addressOrENS); if (isValid) { const ensName = isENSAddressFormat(addressOrENS)