Skip to content

Commit

Permalink
feat(SIWE): include hostname only in the domain field
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Nov 25, 2024
1 parent 893ef83 commit 177ae61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/SignInDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const SignInWithEthereum = () => {
const message = createSiweMessage({
address: address!,

Check warning on line 95 in src/components/SignInDialog.tsx

View workflow job for this annotation

GitHub Actions / quality-assurance

lint/style/noNonNullAssertion

Forbidden non-null assertion.
chainId: 1,
domain: env.NEXT_PUBLIC_SIWE_URL,
domain: new URL(env.NEXT_PUBLIC_SIWE_URL).hostname,
nonce,
uri: env.NEXT_PUBLIC_SIWE_URL,
version: "1",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const env = createEnv({
NEXT_PUBLIC_SIWE_URL:
process.env.NODE_ENV === "production"
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: "localhost:3000",
: "http://localhost:3000",
PINATA_ADMIN_JWT: process.env.PINATA_ADMIN_JWT,
NEXT_PUBLIC_PINATA_GATEWAY_URL: process.env.NEXT_PUBLIC_PINATA_GATEWAY_URL,
},
Expand Down

0 comments on commit 177ae61

Please sign in to comment.