Getting Uint8Array expected error when updating from 1.10.0 to 1.10.4 #6881
Unanswered
JiggyJinjo
asked this question in
Q&A
Replies: 1 comment
-
I've found a solution, basically we have to convert that value of the same line above to Uint8Array before passing it to the keccak256 function : var returnValue = ethereumjsUtil.bufferToHex(keccak256(new Uint8Array(value))); Still, I would like to know how to make it work without having to patch-package the web3-utils lib |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I updated the web3 lib from 1.10.0 to 1.10.4 and I now have issues when dealing with signatures, ie.
web3.eth.abi.encodeFunctionSignature
Here's the test mock I'm giving it :
(Note that I tried many mocks that we have and nothing works anymore)
It returns the following error and stack :
I compared the changes between version 1.10.0 and 1.10.4 and this is the change that breaks it :
What I'm seeing is that on v1.10.0, the
keccak256
function signature accepts a Buffer object and in v1.10.4, it accepts a Uint8Array which could indicate why the function is now broken.Is this a bug or what am I doing wrong? I don't see how I am the only one experiencing this with such a simple use case. I noticed this issue while updating the patch version instantly as we have tests covering this.
Thanks in advance!
Node version: 18.19.1
yarn: 1.22.21
Beta Was this translation helpful? Give feedback.
All reactions