-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[v5] Invalid arrayify value on HDNode.fromMnemonic()
#530
Comments
No worries, I am glad for the help finding issues. :) That said, I cannot reproduce this. Can you include a code snippet? :) let node = ethers.utils.HDNode.fromMnemonic("jewel engage bread festival exclude armor insect motor print cup vague private");
console.log(node);
/*
HDNode {
privateKey:
'0x77637873dd4ef4f08a79e3a3c1d6af910ff6514d249d0d85cb4f9b286f5c203f',
publicKey:
'0x0341f80a43bac79a4cc1c818d59f53cceecc0f35105ca99614bb76a9d9e3528987',
parentFingerprint: '0x00000000',
fingerprint: '0xf8f327e9',
address: '0xb61EE527816262CDDEaee3FDc08a55B1051A2978',
chainCode:
'0xb65b8621e2776659d4526cce7c5ce8f4aa7984f9408756305a1d8645fcb58d40',
index: 0,
depth: 0,
mnemonic:
'jewel engage bread festival exclude armor insect motor print cup vague private',
path: 'm' }
*/ |
It seems to be an issue in browser and/or Webpack environments only. I did some testing and in a Node.js environment I had no issues, but running it in Webpack results in the error above. I had no issues with it in v4. |
I made a small repo where I was able to reproduce the issue: https://github.com/Mrtenz/ethers-issue To test it:
|
@ricmoo Have you had time yet to look into this? |
Ah! Sorry, no I haven't had a chance, this weekend is the CryptoChicks hackathon and I'm a mentor. I just verified you are correct though and am looking into it now. :) |
No problem, thank you! And good luck with the hackathon stuff! |
I've found the problem and have added a fix. I'll push it and publish it once the build is complete. :) |
Ok. Fixed, I think. You will have to blow away your Let me know if you are still having any problems. |
Awesome, just tested it and it seems to work now. I had to delete/regenerate my yarn.lock for the dependencies to update though. |
Using
HDNode.fromMnemonic(mnemonic);
results in this error:I tried
HDNode.fromSeed(mnemonicToSeed(mnemonic));
too, but got the same result.Sorry for making so many issues. 😅
The text was updated successfully, but these errors were encountered: