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

Fix the way casting to int #49

Merged
merged 1 commit into from
Feb 26, 2020
Merged

Conversation

MissMonacoin
Copy link
Contributor

In JavaScript, bit-operator treats operand as double so it shouldn't be used for casting.

@junderw
Copy link
Member

junderw commented Feb 25, 2020

Can you give an example where this breaks something and Math.floor does not?

Or is this just a change for the sake of correctness?

@MissMonacoin
Copy link
Contributor Author

It returns nothing if UTXO that has 2^32 satoshis or more were provided. It is rare, but not impossible.

@junderw junderw merged commit 18b8a80 into bitcoinjs:master Feb 26, 2020
@ac0uk ac0uk mentioned this pull request Apr 7, 2020
MissMonacoin pushed a commit to monya-wallet/monya that referenced this pull request Oct 23, 2020
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 this pull request may close these issues.

2 participants