-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[IMPROVEMENT] Support signTypedData_v4 and use signTypedData_v3 by default in WalletConnect #3350
[IMPROVEMENT] Support signTypedData_v4 and use signTypedData_v3 by default in WalletConnect #3350
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
I have read the CLA Document and I hereby sign the CLA |
Waited this change for long time |
Hey @sethkfman is this good? :) |
@sssemil Is there a specific dapp you are using to test? We just need to confirm the functionality with QA. |
@sethkfman you can use snapshot. I can create a version which you can test. |
and try to vote with walletconnect + metamask and it will work (FYI, there seems to be a problem with loader so just wait a bit) and try to vote - This will get stuck because this proposal uses arrays and requires v4 to work correctly. Then try to use the QA metamask (which I believe includes this fix) and see if it works with the second proposal. I can help with testing if you tell me how to get the QA build of metamask mobile. |
@sethkfman is there anything I could help to speed this up? |
@midgerate & @sssemil In order to maintain backward compatibility the check for |
@sethkfman done. Sorry, was away for a week, I don't have a dapp that I can provide for testing. |
@sethkfman @sssemil I am not sure if this would work with walletconnect, walletconnect only sends signTypedData as method and we should be using v4 as default. isn't v4 compatible with v1 and v3? |
@sssemil I already gave an link to the dapp which can be used to test |
@midgerate you can send custom calls I think, with this - https://docs.walletconnect.com/1.0/client-api#send-custom-request , right? |
@sssemil I see, cool. I could use that. @sethkfman if you can share the QA build I can test it with snapshot.org and let you know if it works. |
v4 has breaking changes, I don't think it works with v3 or older. I would agree that we should use v4 by default. Metamask docs are confusing on the defaults question as well - https://docs.metamask.io/guide/signing-data.html#sign-typed-data-v4 saying that both v3 and v4 are the latest version, and not saying which one is the default one. What makes this even more confusing is that for example if you write tests in hardhat, the default will be v4, and one may end up debugging a weird invalid signature bug for a long time, as I was unfortunate enough to do. |
@sssemil I can create a PR in the walletConnect repo to also implement v4 method. So it does not matter how we implement backward compatibility in metamask wallet, as long as this PR is merged. |
sure, why not :) |
To keep backwards compatibility with our current integrations we should keep |
@sethkfman great! I hope it gets merged soon. |
@sethkfman anything I can do to get this approved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Change the default
signTypedData
version used in WalletConnect to v3 and add support for the v4 version.