-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(deps): unpin ethereumjs-abi@0.6,x ethereumjs-util@6.x #11972
base: main
Are you sure you want to change the base?
Conversation
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. |
This comment was marked as outdated.
This comment was marked as outdated.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/bindings@1.5.0, npm/bip66@1.1.5, npm/drbg.js@1.0.1, npm/file-uri-to-path@1.0.0 |
48fbf0b
to
ff87271
Compare
Bitrise🔄🔄🔄 Commit hash: ff87271 Note
|
d12a053
to
111a548
Compare
111a548
to
b708bac
Compare
Bitrise✅✅✅ Commit hash: b708bac Note
|
6256e6b
to
33737d5
Compare
60ce3d0
to
0bdc3b9
Compare
0bdc3b9
to
59c0489
Compare
Bitrise✅✅✅ Commit hash: 59c0489 Note
|
59c0489
to
5f089e9
Compare
Bitrise✅✅✅ Commit hash: 5f089e9 Note
|
e100160
to
dc8f062
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.
Left a comment
@@ -4,7 +4,7 @@ import StakeInputView from './StakeInputView'; | |||
import { renderScreen } from '../../../../../util/test/renderWithProvider'; | |||
import Routes from '../../../../../constants/navigation/Routes'; | |||
import { backgroundState } from '../../../../../util/test/initial-root-state'; | |||
import { BN } from 'ethereumjs-util'; | |||
import BN5 from 'bnjs5'; |
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.
Could you elaborate on the condition for when these would be replaced with bnjs4 vs bnjs5?
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.
- The aliases
bnjs4
andbnjs5
are declared inpackage.json
. So there is no "magic" here. - This PR primary purpose is to do minimal changes on existing usage without causing breakage. The only migrations (like this) are done in unit tests to make the types line up.
- As to what should be replaced, IMO we should strive to migrate off bn.js v4 (consolidating onto bn.js v5, or perhaps easing off the library entirely, though that's a bigger and longer track than this PR)
## **Description** - Bump `json-rpc-middleware-stream` from `3.0.0` (2020-12-08) to `^4.2.3` (2023-09-27) - Hold at v4 to prevent breaking upgrade from `readable-stream` v2 to v3 ## **Related issues** - #11952 - #11972 - #11932 ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
- to get correct types - to prepare upgrading to versions which don't provide the re-export - fix: vendor BNToHex and hexToBN in order to use bn.js v4 - fix: explicitly use either bn.js@4 and bn.js@5 - Why mixing v4 and v5 is A Bad Thing: ethereumjs/ethereumjs-util#250
dc8f062
to
f3c5c2b
Compare
Bitrise❌❌❌ Commit hash: f3c5c2b Note
Tip
|
Quality Gate passedIssues Measures |
Description
Unpin and dedupe
ethereumjs-util
andethereumjs-abi
while staying on legacy v6Replace
import { BN } from 'ethereumjs-util'
with importingBN
explicitly from eitherbn.js@4
orbn.js@5
toChecksumAddress()
ethereumjs-util@6.1.0
ethereumjs-util
changelogethereumjs-util@v6.1.0...v6.2.0
Related issues
Blocking
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist