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
Right now we always print wallet balances with six fractional digits. Example:
$ ./target/release/forest-cli wallet list
Address Default Balance
f1ahjaxhd4w4qu47t2kasdescbttcgv2ha2doaney 0.000000 FIL
f1necwjawankvg7yyszvzm4oqntlculkfklyzug2q X 0.000000 FIL
f1phxedvr5653h7gvf7jfg6plrbcgyjl2lkjlxhgi 0.000000 FIL
f1uatkwrkzfn5yuw67sxoosh37rujleu6xvb2dhwq 100.000000 FIL
It would improve the user experience if we default to fewer digits but use appropriate units. For example, someone has 0.001 FIL then it should be printed out as "1 milli FIL" or "1 mFIL". We should also limit the output to, say, 4 significant digits. This can be overridden by a flag, --exact-balance. Additionally, the --fixed-unit flag should force the balance to be in FIL.
Tasks:
Use 4 significant digits.
Use appropriate units (FIL, milli FIL, atto FIL, etc).
Add --exact-balance flag.
Add --fixed-unit flag.
Inlcude ~ when the printed balance is not exact.
Example output:
$ ./target/release/forest-cli wallet list
Address Default Balance
f1ahjaxhd4w4qu47t2kasdescbttcgv2ha2doaney 0 FIL
f1necwjawankvg7yyszvzm4oqntlculkfklyzug2q X 8 atto FIL
f1phxedvr5653h7gvf7jfg6plrbcgyjl2lkjlxhgi ~500.2 milli FIL
f1uatkwrkzfn5yuw67sxoosh37rujleu6xvb2dhwq 100 FIL
$ ./target/release/forest-cli wallet list --exact-balance
Address Default Balance
f1ahjaxhd4w4qu47t2kasdescbttcgv2ha2doaney 0 FIL
f1necwjawankvg7yyszvzm4oqntlculkfklyzug2q X 8 atto FIL
f1phxedvr5653h7gvf7jfg6plrbcgyjl2lkjlxhgi 500.236 milli FIL
f1uatkwrkzfn5yuw67sxoosh37rujleu6xvb2dhwq 100 FIL
Issue summary
Right now we always print wallet balances with six fractional digits. Example:
It would improve the user experience if we default to fewer digits but use appropriate units. For example, someone has 0.001 FIL then it should be printed out as "1 milli FIL" or "1 mFIL". We should also limit the output to, say, 4 significant digits. This can be overridden by a flag,
--exact-balance
. Additionally, the--fixed-unit
flag should force the balance to be in FIL.Tasks:
--exact-balance
flag.--fixed-unit
flag.~
when the printed balance is not exact.Example output:
Other information and links
The text was updated successfully, but these errors were encountered: