tari-project / tari-launchpad

A node, wallet and miner for Tari focusing on ease of use
BSD 3-Clause "New" or "Revised" License
8 stars 15 forks source link

feat: improve balance formatting #246

Closed CjS77 closed 7 months ago

CjS77 commented 7 months ago

Adds a little newtype, TariFormat that formats the balance values in a human-friendly way.

De- and Serialization is auto-unwrapped back to a u64 (muT)

Balances now looks like:

Available                                          974,845.997 T
Incoming                                           0 μT
Outgoing                                           0 μT
Timelocked                                         970,590.372 T

rather than:

Available                                          974845997000000
Incoming                                           0
Outgoing                                           0
Timelocked                                         970590372000