-
-
Notifications
You must be signed in to change notification settings - Fork 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
Cannot press sign button when call sign typed data v4 #4441
Comments
I can report the same issue is happening on iOS as well. This bug is going to cause a lot of hurdles for our users for an upcoming NFT launch. The issue only happens with array values.
Here is an example of a payload which fails on metamask, but is successful on Trust and Rainbow. For this method over wallet connect:
|
I found another detail that may help the debug process. Using the payload used in the dApp tester When using an injected provider (dApp browser for metamask mobile, and metamask browser plugin) there is no issue. It's able to sign the payload, and I can recover the address correctly. However, when using the exact same payload as the dApp test over wallet connect with MetaMask mobile, it crashes the app, and is unable to sign. |
Thanks @b21quocbao and @Hmac512 for reporting, I'm taking a look at this issue and I'll give an update soon |
@gantunesr We actually figured this out. It turns out the bug is not with metamask, but with @walletconnect/web3-provider 1.7.8 For some reason, when I make a eth_signTypedData_v4 request, somewhere it gets clobbered to eth_signTypedData without a version. Trust and Rainbow default to v4, while Metamask defaults to v3. V3 doesn’t support arrays, and so if you send a payload with an array value it crashes Metamask. Perhaps it’s worth validating a request to make sure it won’t crash. It took me forever to figure out the issue. Here is a patch that fixes the issue. |
Thanks for the update @Hmac512! A validation would help to avoid the crash, I'll open a PR to address it |
@gantunesr I created a PR. |
With the fix now in place in WalletConnect 1.8.0, is MetaMask able to take this update in the app, or does another blocker remain? |
Hey @kevinwo, thanks for pointing the new version of WC with the fix. We'll validate the new version with MetaMask and update this issue with the results. |
@gantunesr Sounds great, thank you! |
Are there any updates on this issue? |
If you’re building the app that is having an issue, then you can fix this issue by using the patch above. |
Yeah unfortunately we need this to make it to the distributed version of the app in order for our users to benefit. |
The issue in this thread is not a bug in MetaMask, it is a bug in WalletConnect. This should be easy to fix within the app source code. |
For my use case, I found success by explicitly calling to the V4 method when making a request to MetaMask with WalletConnect. Instead of using |
If the desire it's to make a request with sign-typed data v4, you will need to make a custom request with wallet connect with the method |
Describe the bug
When call _signTypedData function from ethers metamask popup to sign the message shown up, Cancel button is pressable but the Sign button is unpressable. When I delete the field with an array type and then execute again, I can press the Sign button and it returns the transaction hash. I think the problem is due to typed data v4, which supports array.
Screenshots
If applicable, add screenshots or links to help explain your problem
To Reproduce
Steps to reproduce the behavior
Expected behavior
A sign button is pressable and returns the transaction hash
Smartphone (please complete the following information):
to be added after bug submission by internal support / PM
Severity
The text was updated successfully, but these errors were encountered: