Skip to content

Commit

Permalink
update error
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-t-wang committed May 21, 2024
1 parent 119a58e commit 792d61b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/helpers/siwe/siwe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,15 @@ export const verifySiweMessage = async (
}

if (statement && siweMessageData.statement !== statement) {
throw new Error("Statement mismatch");
throw new Error(
`Statement mismatch. Got: ${siweMessageData.statement}, Expected: ${statement}`
);
}

if (requestId && siweMessageData.request_id !== requestId) {
throw new Error("Request ID mismatch");
throw new Error(
`Request ID mismatch. Got: ${siweMessageData.request_id}, Expected: ${requestId}`
);
}

// Check ERC-191 Signature Matches
Expand Down

0 comments on commit 792d61b

Please sign in to comment.