Skip to content

Fixing precision issue when converting the u64 cents amount into f32.

Now composing the displayed value with integer part and fractional part separately (keeping left padding of 0 for the decimal part for the amount of decimals required)

Potential issue with this version is that we don't use the locale to decide on the decimal separator (hardcoded to "." here)

Tested locally and resolve the issue with big amounts.

Example before:

gcli account balance                                                       
5Funkng8dL397H9ZEJ9sXDjFhStCqRYUj1a62ngcrEMy7ivn has 11233705000 ĞD

After:

gcli account balance 
5Funkng8dL397H9ZEJ9sXDjFhStCqRYUj1a62ngcrEMy7ivn has 11233705361.58 ĞD

Merge request reports