Skip to content

[Bug]: Different big number libraries being used #9850

@infiniteflower

Description

@infiniteflower

Describe the bug

We have multiple BigNumber libraries in use right now, bignumber.js, bn.js, etc

You can see this from app/util/number/index.js

import { BN, stripHexPrefix } from 'ethereumjs-util';
import { utils as ethersUtils } from 'ethers';
import convert from 'ethjs-unit';
import {
  BNToHex,
  hexToBN as controllerHexToBN,
} from '@metamask/controller-utils';
import numberToBN from 'number-to-bn';
import BigNumber from 'bignumber.js';

Would be good to settle on a single library.

Expected behavior

A singular BigNumber library should be used to prevent incompatibilities or strange/unexpected behavior from happening.

Screenshots/Recordings

No response

Steps to reproduce

n/a

Error messages or log output

No response

Version

7.24.0

Build type

None

Device

Android, iOS

Operating system

iOS, Android

Additional context

No response

Severity

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To be triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions