ethjs-unit icon indicating copy to clipboard operation
ethjs-unit copied to clipboard

Fixed small numbers parsing

Open slavafomin opened this issue 3 years ago • 3 comments
trafficstars

This PR fixes the issue https://github.com/ethjs/ethjs-unit/issues/6.

Released as: @ton.js/[email protected] for testing and a as quick fix.

slavafomin avatar Jun 02 '22 14:06 slavafomin

Solution is pending. Current implementation has some flaws.

slavafomin avatar Jun 02 '22 15:06 slavafomin

I've updated number parsing to use Intl for more reliable results, both toString and toFixed give incorrect results for some numbers.

slavafomin avatar Jun 02 '22 16:06 slavafomin

Published as @ton.js/[email protected] for testing and as a hotfix.

slavafomin avatar Jun 02 '22 16:06 slavafomin