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

Recover does not work with signature created by web3.js 4.x + ledger #6344

Closed
avkos opened this issue Aug 9, 2023 · 0 comments
Closed

Recover does not work with signature created by web3.js 4.x + ledger #6344

avkos opened this issue Aug 9, 2023 · 0 comments
Assignees
Labels

Comments

@avkos
Copy link
Contributor

avkos commented Aug 9, 2023

const signature = "0xec4f73260ac14882e65995a09359896a0ae8f16bd0d28b0d9171655b4e85271e07cda040be059fdcbf52709e3c993eb50a89ce33f41617dc090dc80a583e3c4f00";

const messageToSign = "I hereby confirm that I am the sole beneficial owner of the assets involved in the business relationship with Fiat24. \nI hereby undertake to inform Fiat24 proactively of any changes to the information contained herein."

const address = web3.eth.accounts.recover(messageToSign, signature);

it can recover other signatures, but not this one
I tried the same messageToSign and signature, with web3 v1, ethers and viem and all can recover it correctly
only seems to fail with web3 v4

Also, I test this way: sign on 1.x and recover on 4.x, which works. Need to be investigated why it is not working for this signature. It was generated by web3.js 4.x + ledger

Expected behavior

Actual behavior

Steps to reproduce the behavior

  1. [First step]
  2. [Second step]
  3. [and so on...]

Logs

Environment

@avkos avkos added Investigate 4.x 4.0 related labels Aug 9, 2023
@avkos avkos changed the title Recover does not work with old signature Recover does not work with signature created by web3.js 4.x + ledger Aug 15, 2023
@luu-alex luu-alex self-assigned this Sep 26, 2023
@luu-alex luu-alex removed the Estimate label Sep 26, 2023
@jdevcs jdevcs mentioned this issue Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants