Skip to content

Commit

Permalink
links: fix profiles (#5088)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylarbarrera authored Oct 4, 2023
1 parent 4ce4559 commit a0bf003
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/handlers/deeplinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0bf003

Please sign in to comment.