Skip to content

Commit

Permalink
validate types in next
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomas committed Nov 28, 2024
1 parent 10e95d0 commit 80e028c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dapps/appkit-siwe/next/app/config/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export const siweConfig = createSIWEConfig({
}

const { address, chainId } = session as unknown as SIWESession;
// Validate address and chainId types
if (typeof address !== "string" || typeof chainId !== "number") {
return null;
}

return { address, chainId };
},
Expand Down

0 comments on commit 80e028c

Please sign in to comment.