-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
deps: upgrade from ethereumjs-util #3943
Conversation
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@types/bn.js@5.1.1 |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
d16a37f
to
ee3f6f3
Compare
@@ -41,7 +42,6 @@ | |||
"@metamask/message-manager": "^7.3.8", | |||
"@metamask/utils": "^8.3.0", | |||
"async-mutex": "^0.2.6", | |||
"ethereumjs-util": "^7.0.10", | |||
"ethereumjs-wallet": "^1.0.1", |
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.
Note: Updating to @ethereumjs/wallet
(and thereby a transitive dependency on ethereumjs-util
) breaks Node.js 16 support, hence blocked by #3611
ee3f6f3
to
ef140be
Compare
ef140be
to
12a65dd
Compare
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.
Just a few things I noticed, but otherwise looks good.
12a65dd
to
5dc92c0
Compare
ae7e3f3
to
69a88bb
Compare
lifted from assets-controller
TODO: see if safe to stop double-trimming leading as well as trailing zeroes in getTokenSymbol and thereby replace toUtf8 with something simpler.
…ask/utils and @ethereumjs/util
…tils and @ethereumjs/util
…util, ethereum-cryptography
…/utils equivalents
…til and @metamask/utils - test(keyring-controller): Update expected error message when importing invalid key
69a88bb
to
8adba4f
Compare
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
Legacy
ethereumjs-util
is used primarily for two things: its re-exportedbn.js
instance and a handful of bytes/hex/string utility functions.BN
directly frombn.js
instead of viaethereumjs-util
.ethereumjs-util
library functions with equivalent from@metamask/utils
if already availableadd0x
/remove0x
ethereum-cryptography
for crypto functions no longer available in@ethereumjs/util
TextEncoder
awareness to test runtime ofcontroller-utils
(needed for crypto hash function)@ethereumjs/util@^8.1.0
for remainingethereumjs-util
importsReferences
Changelog
@metamask/accounts-controller
ethereumjs-util
with@ethereumjs/util
andethereum-cryptography
@metamask/assets-controller
ethereumjs-util
with@ethereumjs/util
andbn.js
@metamask/controller-utils
ethereumjs-util
with@ethereumjs/util
@metamask/gas-fee-controller
ethereumjs-util
withbn.js
@metamask/keyring-controller
ethereumjs-util
with@ethereumjs/util
@metamask/message-manager
ethereumjs-util
@metamask/signature-controller
ethereumjs-util
@metamask/transaction-controller
ethereumjs-util
with@ethereumjs/util
andbn.js
@metamask/user-operation-controller
ethereumjs-util
withbn.js
Checklist