You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
balances in state is currently a js number. it has limitation on how large the number can be.
we cannot store js BigNumber in state, doing so cause various problems.
so we should store the number as string in the state.
everytime we use it, we should remember to convert it to bignumber.
evertime we store balance in state, we should remember to convert it to string representation.
allow user to use string to specify amount in input so big number can be used.
balances in state is currently a js number. it has limitation on how large the number can be.
we cannot store js BigNumber in state, doing so cause various problems.
so we should store the number as string in the state.
everytime we use it, we should remember to convert it to bignumber.
evertime we store balance in state, we should remember to convert it to string representation.
allow user to use string to specify amount in input so big number can be used.
eg.
curl -X POST http://localhost:3000/txs -d '{"type": "bet", "marketId": "market2", "outcome": 1, "amount": 10, "user": "5wvwWgKP3Qfw1akQoXWg4NtKmzx5v4dTj"}'
change the amount to string.
curl -X POST http://localhost:3000/txs -d '{"type": "bet", "marketId": "market2", "outcome": 1, "amount": "2000000000000", "user": "5wvwWgKP3Qfw1akQoXWg4NtKmzx5v4dTj"}'
everytime we read the amount, we should use
let amount = new BigNumber(inputAmount);
to make sure we convert it to bignumber.
The text was updated successfully, but these errors were encountered: