-
Notifications
You must be signed in to change notification settings - Fork 4.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
Decrypting a keystore fails on 1.2.9 (browser / React ) #3580
Comments
…3581) * (untested) potential fix for #3580 I haven't even executed this. Maybe it's... already working like that?! dunno if ES6 spread ops already are allowed here?! * added #3580 fix to changelog * #3580 adds e2e test that covers the incompatible line changed the Changelog to reflect relation to React
I have the same issue but with |
…3581) * (untested) potential fix for #3580 I haven't even executed this. Maybe it's... already working like that?! dunno if ES6 spread ops already are allowed here?! * added #3580 fix to changelog * #3580 adds e2e test that covers the incompatible line changed the Changelog to reflect relation to React
…3581) * (untested) potential fix for #3580 I haven't even executed this. Maybe it's... already working like that?! dunno if ES6 spread ops already are allowed here?! * added #3580 fix to changelog * #3580 adds e2e test that covers the incompatible line changed the Changelog to reflect relation to React
This just got merged in an hour ago @wendydv1989 @elmariachi111 If you'd like you can check the |
yep, tested that with my demo repo and 1.x fixes the issue ❤️ |
Awesome, will close this out once we cut a release :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment. |
1.2.9 broke
web3.eth.accounts.wallet.decrypt
(works fine in 1.2.8):Expected behavior
in the browser (chromium) I can decrypt an encrypted wallet keystore structure.
Actual behavior
it shows me an the error
TypeError: "list" argument must be an Array of Buffers
Steps to reproduce the behavior
call
web3.eth.accounts.wallet.decrypt(jsonKeystore, password);
I've put a demo repo here:
https://github.com/cod1ng-earth/demo-web3-129-breaks-keystore-decryption
Environment
node 13 / 14 for building, chrome 83
Background
I debugged until the failing call that occurs on 1.2.9 on
web3-eth-accounts
, Line 384: 2f366c7#diff-7bb2a20126193b9ecfe4723f83429c49R384The result of the newly introduced
derivedKey = scrypt.syncScrypt
seems to be related somehow, even though[derivedKey.slice(16, 32), ciphertext]
is actually an array of two Uint8 arrays ([Uint8Array(16), Uint8Array(32)]
). After having a look at the scrypt line (https://github.com/ricmoo/scrypt-js/blob/master/scrypt.js#L462
) I'm absolutely not sure what could go wrong here, so I leave it up to you guys :(The text was updated successfully, but these errors were encountered: