-
-
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
[FIX] Wallet connect signed typed and eth sign throwing error back to the dapp #5103
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. |
While it looks like this PR resolves the silent failure when attempting to sign with V4, will there be a follow-on PR then that upgrades the WalletConnect library to >= 1.8.0 and support V4 signing? |
Hello @kevinwo , thanks for testing the PR! I'm not sure what you are asking but you can do a sign request V4 if you stablish connection with wallet connect and send a custom request with the method |
@tommasini Ahh yes, that makes sense. Thank you! |
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. Just a couple of small comments
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
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.
@tommasini swinging this back your way!
Issue 1
On your clone repo when I tried connecting to wallet connect by scanning the QR code nothing happens. I am not prompted with the connect modal. Furthermore, when I attempt to scan the QR code again, I get prompted that the QR was already scanned. See recording.
Issue 2
When I tried signing WC v4 I get Error: TypedMessageManager: Message not found for id: undefined.
see recording.
To reproduce:
Connect to wallet connect and try signing WC sign Typed Data V4
Issue 3
Eth sign is broken on your repo. I get Error: eth_sign requires 32 byte message hash
To reproduce:
Connect to the test dapp on your repo
Tap Eth Personal Sign
Notice the error
See recording
Keep in mind, the regular test dapp is working as expected!
Thank you for testing @cortisiko! Issue 1: |
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.
@tommasini thanks for the update. This PR is QA passed. Things I tested:
- signing with WC on a couple dapps such as opensea and rariable
- signing on our test dapp
- signing with WC on your (@tommasini) test dapp
- signing WC with keystone
- signing regular dapps with keystone
- WC transactions
Description
Wallet connect default sign typed data function we redirect it to v3 and if the dapp send a message with array structured we do not support it.
We also were not returning back the eth sign function if it went wrong back to the dapp.
Proposed Solution
When a user signs a message that is only supported with v4 with the default sign method of wallet connect, we throw the error back to the dapp and say to our user that the sign failed.
We also send back to the dapp the error if eth sign fails.
Screenshots/Recordings
https://recordit.co/mH3Es44m1J
Test Cases
Case1:
wc-support
yarn setup
and thenyarn start
Case2:
Code impact
Low
Issue
Progresses ##4441, #3887, #3580
Checklist