-
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
temporarily patch ethereumjs-util
to use an implementation of stripHexPrefix
that doesn't throw when pass a non string typed arg
#16094
Conversation
Builds ready [60ecba0]
Page Load Metrics (2434 ± 79 ms)
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Yowza. Good catch @adonesky1!! 😅 |
Builds ready [333afe9]
Page Load Metrics (2358 ± 104 ms)
|
@adonesky1 I've tried again but I'm still seeing the stripHexPrefix error and cannot decrypt |
333afe9
to
81a6766
Compare
81a6766
to
3d4930e
Compare
@seaona could you try again now? |
Builds ready [3d4930e]
Page Load Metrics (2702 ± 113 ms)
|
@adonesky1 works for me! |
@adonesky1 Do we have a long term plan to not pass non-strings to functions that expect strings? I mean issues like these are often symptoms of an underlying problem. |
Same |
Typescript is the long term plan, and then using that to find all the cases in which we treat data types interchangeably and fix them. The changes that prompted ethereumjs-util to start throwing on these type differencees were largely attributable to their adoption of TS. |
Good! Just wanted to make sure we had an overarching plan for fixing these! |
The PR title suggests that |
Yea whoops meant to change it. Originally was patching |
ethereumjs-util
to use an implementation of stripHexPrefix
that doesn't throw when pass a non string typed arg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Explanation
Because we use a yarn deduplication strategy that will resolve the all packages with the carrot
^
to the highest minor version if it is shared across the dependency tree, some recent updates bumped the highest shared minor version ofethereumjs-util
to7.1.5
which (somewhere between 7.0.9 and 7.1.5) failed to acknowledge that it actually contains a breaking change:stripHexPrefix
now throws an error if pass a non-string typed arg, where previously it would simply return the arg unaltered. We assume this latter behavior in a number of places, hence the addition of this older implementation to hexstring-utils here.This is a temporary patch to get this back to working, while some inflight work in the
eth-simple-keyring
,eth-hd-keyring
andeth-keyring-controller
gets resolved in such a way that we will have a more durable long term fix.More Information
[stripHexPrefix] input must be string, received object
#16052Manual Testing Steps
Pre-Merge Checklist
+ If there are functional changes: