Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: signTypedData eip712domain #2048

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

ieow
Copy link
Contributor

@ieow ieow commented Jan 2, 2025

Motivation and Context

Jira Link:

Description

sync signTypedData handler between ethereum-mpc-provider and ethereum-provider
39dddf7

question
should the developer should make sure the eip712domain is not added to the types or the wallet should remove it from the types?
currently ethers lib's TypedDataEncoder.getPayload(domain, types, value) is generating the payload with eip712domain type in the types

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Copy link

vercel bot commented Jan 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3auth-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 10:38am

@ieow
Copy link
Contributor Author

ieow commented Jan 8, 2025

@himanshuchawla009 , @chaitanyapotti

do we want to delete the Domain type in the 'types' field?
or should we skip check unused Domain type ?

Both ethers and viem are appending the Domain type to the types field

Copy link
Member

@himanshuchawla009 himanshuchawla009 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@himanshuchawla009 himanshuchawla009 merged commit 636245e into master Jan 8, 2025
5 checks passed
@himanshuchawla009 himanshuchawla009 deleted the fix/mpc-signTypedData-eip712domain branch January 8, 2025 05:58
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.

2 participants