Hex data is odd-length intermittent error #1528
-
When trying to instantiate a new ethers.Wallet instance, I would intermittently get the following error: It would happen maybe around 1 out of 20 times.
Where kp.privateKey is a Uint8Array. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The You want to use (moving to discussions; issues are for bugs and feature requests) |
Beta Was this translation helpful? Give feedback.
The
hexValue
is designed to return quantity types, which are hex values, with leading zeros removed. You should be getting that error 1 out of 16 times.You want to use
ethers.utils.hexlify
.(moving to discussions; issues are for bugs and feature requests)