Skip to content
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

Replace ethjs packages with @metamask/ethjs forks #2064

Merged
merged 4 commits into from
Nov 20, 2023

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented Nov 20, 2023

Explanation

Use MetaMask forks of ethjs packages. This is the first step of a gradual update which will result in removing dependency on babel-runtime@6.x, amongst other improvements.

References

Related

Changelog

@metamask/controller-utils

  • CHANGED: Update from ethjs-unit to @metamask/ethjs-unit

@metamask/gas-fee-controller

  • CHANGED: Update from ethjs-unit to @metamask/ethjs-unit

@metamask/assets-controllers

  • CHANGED: Update from ethjs-provider-http to @metamask/ethjs-provider-http

@metamask/transactions-controller

  • CHANGED: Update from ethjs-provider-http to @metamask/ethjs-provider-http

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

Copy link

socket-security bot commented Nov 20, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@metamask/ethjs-provider-http 0.2.0 environment +3 465 kB lgbot
@metamask/ethjs-unit 0.2.1 None +0 457 kB

@legobeat legobeat added the dependencies Pull requests that update a dependency file label Nov 20, 2023
Copy link

socket-security bot commented Nov 20, 2023

👍 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.

Ignoring: @metamask/ethjs-unit@0.2.1

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

@legobeat
Copy link
Contributor Author

@SocketSecurity ignore @metamask/ethjs-unit@0.2.1

@legobeat legobeat requested a review from MajorLift November 20, 2023 09:05
@legobeat legobeat force-pushed the deps-ethjs branch 4 times, most recently from 5a4954c to 4cf75e8 Compare November 20, 2023 09:22
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the places we are using these packages are in tests, so there is an opportunity to remove usage entirely, but we can leave that for another PR. Looks good.

@legobeat
Copy link
Contributor Author

legobeat commented Nov 20, 2023

Most of the places we are using these packages are in tests, so there is an opportunity to remove usage entirely, but we can leave that for another PR. Looks good.

Isn't the point of using it in tests to preserve compatibility with existing downstream use, ie extension and mobile? That is, they should be removed there before being removed as tests here.

@legobeat legobeat merged commit 6822b6f into MetaMask:main Nov 20, 2023
128 checks passed
@mcmire
Copy link
Contributor

mcmire commented Nov 20, 2023

Sure, we can definitely wait until we remove them from the clients before removing them here.

@legobeat legobeat deleted the deps-ethjs branch November 20, 2023 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants