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

BigInt for handling numbers #5

Closed
hsjoberg opened this issue Aug 5, 2019 · 2 comments
Closed

BigInt for handling numbers #5

hsjoberg opened this issue Aug 5, 2019 · 2 comments
Labels
security Related to security of the app
Milestone

Comments

@hsjoberg
Copy link
Owner

hsjoberg commented Aug 5, 2019

Arithmetic operations on milli-satoshis can lead to loss in precision.

There's a built in BigInt lib in JS nowadays that could be used.

@hsjoberg hsjoberg added this to the MVP milestone Aug 5, 2019
@hsjoberg hsjoberg added the security Related to security of the app label Aug 5, 2019
@hsjoberg
Copy link
Owner Author

hsjoberg commented Aug 7, 2019

Protobufjs does not currently support translating numbers to BigInt, protobufjs/protobuf.js#1151

Going with package long for now looks like the best solution https://www.npmjs.com/package/long

@hsjoberg
Copy link
Owner Author

hsjoberg commented Aug 7, 2019

Longjs implemented in 77cb50f

@hsjoberg hsjoberg closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Related to security of the app
Projects
None yet
Development

No branches or pull requests

1 participant