MetaMask / MetaMask/metamask-extension

Investigation: `bn.js` vs `bignumber.js` vs `bigInt`

Open
#16,533 1 comment 0 reactions 0 assignees View on GitHub
MV3 product-backlog team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Currently we have many versions of `bn.js` and a few of `bignumber.js`. We need to investigate the following:

1. Can these packages be used interchangeably?
2. If so, which one should we use?
3. Can we eventually migrate use to `bigInt`? Or do we rely on functionality not available with `bigInt`

Contributor guide

Open the contributing guide

Research direction

Search the extension for imports and usages of bn.js, bignumber.js, and BigInt, then compare the operations those call sites require. Done means documenting whether the packages are interchangeable, recommending one library, and identifying any functionality that prevents migration to BigInt.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.