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

Review big numbers in javascript code. #7

Open
kevsul opened this issue Mar 15, 2019 · 0 comments
Open

Review big numbers in javascript code. #7

kevsul opened this issue Mar 15, 2019 · 0 comments

Comments

@kevsul
Copy link
Contributor

kevsul commented Mar 15, 2019

We need to review any numbers that are potentially huge (e.g. transaction amounts, utxo positions) and use BigNumber.js where necessary.

For example:
omg-wallet.js line 197 should be:

const selected = correctCurrency.find(utxo => new BigNumber(utxo.amount).gte(new BigNumber(amount)))

And line 161:

if (new BigNumber(utxosToSpend[0].amount).gt(new BigNumber(value))) {
@kevsul kevsul mentioned this issue Mar 18, 2019
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

No branches or pull requests

1 participant