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

Wrong output type for toBigInt #1485

Closed
wants to merge 1 commit into from
Closed

Wrong output type for toBigInt #1485

wants to merge 1 commit into from

Conversation

lcswillems
Copy link

@lcswillems lcswillems commented Apr 19, 2021

The type of an instance of BigInt is bigint.

This is important because if a and b are of type BigInt, we can't sum them for example...

The type of an instance of `BigInt` is `bigint`.

This is important because if `a` and `b` are of type `BigInt`, we can sum them for example...
@ricmoo
Copy link
Member

ricmoo commented Apr 19, 2021

Ah! You are correct! Thanks for letting me know. I’ll fix this today.

@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. labels Apr 19, 2021
@lcswillems
Copy link
Author

Thank you for such a fast answer!!

ricmoo added a commit that referenced this pull request Apr 20, 2021
@ricmoo
Copy link
Member

ricmoo commented Apr 20, 2021

This should be fixed in 5.1.3.

Let me know if it works for you now. :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Apr 20, 2021
@lcswillems
Copy link
Author

lcswillems commented Apr 20, 2021

I still have the same issue with 5.1.3. Return type is still BigInt.

@ricmoo
Copy link
Member

ricmoo commented Apr 20, 2021

The d.ts looks correct: https://github.com/ethers-io/ethers.js/blob/master/packages/bignumber/lib/bignumber.d.ts#L31

Can you show what your code looks like and paste the error?

@lcswillems
Copy link
Author

I have ethers version 5.1.3. And for this version, the version of bignumber is 5.1.0 in which it is still BigInt.

@ricmoo
Copy link
Member

ricmoo commented Apr 20, 2021

Can you remove your package-lock.json, node_modules/ (and if you use yarn, the yarn lockfile), and redo npm install? That should solve the issue.

@lcswillems
Copy link
Author

I got version 5.1.0 of Ethers because it was requested by other packages. But after removing yarn.lock, it solved the issue! Thanks a lot for your help and speed!!

@ricmoo ricmoo closed this Apr 20, 2021
pull bot pushed a commit to shapeshift/ethers.js that referenced this pull request Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants