Skip to content

fix(claim): checksum SIWE wallet address before signing#269

Merged
GsCommand merged 1 commit into
mainfrom
codex/fix-siwe-malformed_message-error
May 22, 2026
Merged

fix(claim): checksum SIWE wallet address before signing#269
GsCommand merged 1 commit into
mainfrom
codex/fix-siwe-malformed_message-error

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • SIWE message parsing requires the address line to be EIP-55 checksummed and some providers return lowercase addresses, causing malformed_message errors.
  • The change focuses on normalizing the wallet address client-side so the SIWE message contains a checksummed address and verification succeeds.

Description

  • Added a browser UMD include for ethers to public/claim.html so client code can call ethers.getAddress for checksum normalization.
  • Implemented toChecksumAddress(address) that uses ethers.getAddress(...) and surfaces a clear user-visible error when conversion fails.
  • Normalized the eth_requestAccounts result to an EIP-55 checksummed address when connecting the wallet and before building the SIWE message in the sign-in flow in public/claim.html.
  • Ensured personal_sign is invoked with the same checksummed account and did not change backend SIWE validation behavior.

Testing

  • Ran npm install and then repository tests with npm test, where all tests passed (31 tests, 0 failures).
  • Ran the example checks in examples/webhook-auto-verify via cd examples/webhook-auto-verify && npm install && npm run check, which completed successfully.
  • Attempted npm run build but the repository has no build script (confirmed as missing).

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
commandlayer-commandlayer-org Ready Ready Preview, Comment May 22, 2026 3:32am
commandlayer-org Ready Ready Preview, Comment May 22, 2026 3:32am
commandlayer-org111 Ready Ready Preview, Comment May 22, 2026 3:32am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant