Closed clesaege closed 6 years ago
@satello API error?
Another user with the issue: https://youtu.be/jji4YGgN1Z4
While you are at it...
Left miniscule amount and formatting is odd.
2.9143354e-11.toFixed(18)
It looks like the issue is when converting from a BigNumber to a float you only get 9 significant digits and by default it does standard rounding (up at 5+). So if you have 1.66666... PNK it will be converted to 1.666666667. I am going to take out the conversions in the API so the front end can convert for display purposes but all passed values will be integers
Is it necessary to convert to float? Why not do calculations using big number library and when needs to be displayed convert it to string. Same way string input can be parsed to a big number.
True that would be a simpler fix for now, and we don't have need of floats. The front end isn't making any calculations so it can just use strings. I do think it makes sense for the API to return BigNumbers instead of strings in the future and have the front ends convert to whatever form they need
Everything should stay in BN, everywhere. Only convert to strings for rendering. On Tue, Aug 28, 2018 at 8:53 AM Sam Vitello notifications@github.com wrote:
True that would be a simpler fix for now. The front end isn't making any calculations so it can just use strings. I do think it makes sense for the API to return BigNumbers instead of strings in the future and have the front ends convert to whatever form they need
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kleros/kleros-juror-front/issues/134#issuecomment-416592158, or mute the thread https://github.com/notifications/unsubscribe-auth/ASRQaFTgtzZCCNORqr6QXsqZtYjHew53ks5uVUs8gaJpZM4WKOc- .
Hi, I tried to transfer the amount provided by the interface "504041,44934273383" and got this error Removing one decimal fixes the issue.