Skip to content

Conversation

@legobeat
Copy link
Contributor

@legobeat legobeat commented Oct 28, 2024

Description

Replace use of bn.js@4 with bn.js@5.

Related issues

Blocked by

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@github-actions
Copy link
Contributor

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.

@legobeat legobeat added dependencies Pull requests that update a dependency file team-application-security Application security team labels Oct 28, 2024
@socket-security
Copy link

socket-security bot commented Oct 28, 2024

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

🚮 Removed packages: npm/@types/[email protected]

View full report↗︎

@legobeat legobeat changed the title chore: remove usage of bn.js v4 fix: remove usage of bn.js v4 Oct 28, 2024
@legobeat legobeat force-pushed the bnjs5 branch 3 times, most recently from c19c4a9 to e00d162 Compare October 28, 2024 06:42
@legobeat
Copy link
Contributor Author

legobeat commented Oct 28, 2024

Fun fact:

> (new BN4(NaN.toString())).toString(10)
'2423'

@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 056a9aa
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/04ef2eeb-efc1-45a4-872b-2be3b4c450f2

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@legobeat legobeat requested a review from a team October 29, 2024 06:35
@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 2096f86
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e9b9f703-e490-442e-80f8-af2b5f8a53f3

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@sonarqubecloud
Copy link

@legobeat legobeat mentioned this pull request Oct 29, 2024
@legobeat legobeat force-pushed the deps-ethereumjs-util-7 branch 3 times, most recently from 7818d3f to 7e3ed75 Compare October 29, 2024 19:48
@NicolasMassart NicolasMassart self-assigned this Dec 3, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2025

This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale Issues that have not had activity in the last 90 days label Mar 3, 2025
@legobeat
Copy link
Contributor Author

still relevant

@github-actions github-actions bot removed the stale Issues that have not had activity in the last 90 days label Mar 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Mar 13, 2025
## **Description**

- Unpin and dedupe `ethereumjs-util` and `ethereumjs-abi` while staying
on legacy v6
- Replace `import { BN } from 'ethereumjs-util'` with importing `BN`
explicitly from either `bn.js@4` or `bn.js@5`
  - Mixing the two is not safe and can cause breakage.
- [Some on why this is A Bad
Thing](ethereumjs/ethereumjs-util#250)
- We don't get complete and correct typings with importing the old
re-export
- This adds both v4 and v5 as explicit dependencies - ideally v4 will be
removed as transition to v5 concludes
- Add EIP-1191 address checksum algorithm support for
`toChecksumAddress()`
- Unblock relying on the ancient and deprecated `[email protected]`
  
- [`ethereumjs-util`
changelog](https://github.com/ethereumjs/ethereumjs-util/blob/master/CHANGELOG.md)
-
[`[email protected]`](ethereumjs/ethereumjs-util@v6.1.0...v6.2.0)

## **Related issues**

- indutny/bn.js#209
- indutny/bn.js#295
- #12010

#### Blocking
- #11932
  - #12043
  - #11968

## **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
- [x] 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.

---------

Co-authored-by: Nicolas MASSART <[email protected]>
Co-authored-by: Nico MASSART <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2025

This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale Issues that have not had activity in the last 90 days label Jun 9, 2025
@github-actions
Copy link
Contributor

This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions.

@github-actions github-actions bot closed this Jun 17, 2025
@github-project-automation github-project-automation bot moved this from Needs more work from the author to Merged, Closed or Archived in PR review queue Jun 17, 2025
@gauthierpetetin gauthierpetetin removed this from Bugs Jun 23, 2025
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 stale Issues that have not had activity in the last 90 days team-application-security Application security team type-bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants