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

signMessage using Coinbase wallet extension on browser #1840

Closed
ghost opened this issue Aug 6, 2021 Discussed in #1839 · 3 comments
Closed

signMessage using Coinbase wallet extension on browser #1840

ghost opened this issue Aug 6, 2021 Discussed in #1839 · 3 comments
Labels
minor-bump Planned for the next minor version bump.

Comments

@ghost
Copy link

ghost commented Aug 6, 2021

Discussed in #1839

Originally posted by punk1004 August 7, 2021
I connected Coinbase wallet app and signed message using signer.signMessage() function.
But the result of ethers.utils.verifyMessage() returned different address from the signer's address.
Has anyone experienced this before?

@hanzelnut
Copy link

I was just trying the same sort of thing over WalletLink to the Coinbase Wallet app and it seems it's because eth_sign for their provider was expecting the hash of the message, not the message itself. It might be the same issue for you too.
While looking around for a way to switch to personal_sign, I also stumbled on a PR for TrustWallet compatibility. And inspired by their change made it generic. Local testing seems to be working, so check with some others about it since it's my doing anything on a node.js project. If you want to try it too, it's at https://github.com/hanzelnut/ethers.js/tree/personal_sign

@hanzelnut
Copy link

Was made aware of an even better solution: Instead of forking the project, here's a way to call personal_sign from your code. See #491

@ricmoo ricmoo added the minor-bump Planned for the next minor version bump. label Aug 24, 2021
ricmoo added a commit that referenced this issue Oct 16, 2021
…cSigner; added _legacySignMessage for legacy support (#1542, #1840).
@ricmoo
Copy link
Member

ricmoo commented Oct 20, 2021

This has been updated in 5.5.0.

For those who require the old behaviour, the JsonRpcSigner has a _legacySignMessage method which mimics the old behaviour; but not that this is functionality most clients no longer support, or if they support the method, it performs prefixing breaking legacy anyways. In v6, this method will go away.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor-bump Planned for the next minor version bump.
Projects
None yet
Development

No branches or pull requests

2 participants