-
Notifications
You must be signed in to change notification settings - Fork 5k
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
account.hashMessage
is incorrect with non-ASCII characters
#3523
Comments
I found the same problem as you, and the solution you suggested works! (I tested at ubuntu 18.04 / OSX 10.15.4 and node version is 13.5.0) |
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Actual behavior
The two hash values should be the same.
I think you should use
web3.utils.utf8ToHex
on this line.https://github.com/ethereum/web3.js/blob/4ec98d48096007b113d38f634243cf99df6702cd/packages/web3-eth-accounts/src/index.js#L296
Steps to reproduce the behavior
git clone https://github.com/odan-sandbox/eth-ecRecover-compare
yarn install
yarn ts-node src/app.ts
Environment
web3: 1.2.7
nodejs: 12.11.1
The text was updated successfully, but these errors were encountered: