Skip to content

fix(cli-sdk): route sign-typed-data requests to correct chain#37

Merged
arein merged 2 commits into
mainfrom
fix/sign-typed-data-chain-routing
Mar 9, 2026
Merged

fix(cli-sdk): route sign-typed-data requests to correct chain#37
arein merged 2 commits into
mainfrom
fix/sign-typed-data-chain-routing

Conversation

@arein
Copy link
Copy Markdown
Contributor

@arein arein commented Mar 9, 2026

Summary

  • cmdSignTypedData was always sending eth_signTypedData_v4 requests on eip155:1 (first account) regardless of the typed data's actual chainId
  • Wallets like Zerion would ignore or expire requests sent on the wrong chain, causing silent failures
  • Now extracts chainId from the typed data domain and finds the matching account (e.g. eip155:137 for Polygon) before sending the request

Test plan

  • Connect wallet on a non-mainnet chain (e.g. Polygon)
  • Run sign-typed-data with typed data containing a domain chainId matching the connected chain
  • Verify the request is routed to the correct chain account and the wallet receives it

🤖 Generated with Claude Code

arein and others added 2 commits March 9, 2026 10:43
cmdSignTypedData was always sending eth_signTypedData_v4 requests on
eip155:1 (the first account) regardless of the typed data's actual
chainId. Wallets like Zerion would ignore or expire requests sent on
the wrong chain, causing silent failures.

Now extracts chainId from the typed data domain and finds the matching
account (e.g. eip155:137 for Polygon) before sending the request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arein arein merged commit f6c6025 into main Mar 9, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant