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

Remove toWEI and fromWEI in favour of ethers.utils #458

Open
bh2smith opened this issue Sep 23, 2022 · 1 comment
Open

Remove toWEI and fromWEI in favour of ethers.utils #458

bh2smith opened this issue Sep 23, 2022 · 1 comment

Comments

@bh2smith
Copy link
Owner

Documentation here: https://docs.ethers.io/v4/api-utils.html#ether-strings-and-wei

THis would mean we no longer need to unit test the functions as they are already tested elsewhere.

@bh2smith
Copy link
Owner Author

BTW @schmanu - this change is going to be incredibly painful since we have to change the BigNumber type from bignumberjs to ethers. I have already started porting this and will link a draft PR here. Some things we will have to deal with:

  1. bignumber.js works on floating points as well, while the ethers one seems to only support integers.
    This means that BigNumber.from("1.1") is no longer a thing.
  2. We also have in some places (for NFTs) assertions that tokenID is not NaN and isInteger both of these functions don't exist on ethers.BigNumber (however once we get the floating point issue sorted out these checks may no longer be valid).

Here is the draft PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant