Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pretty amount formatting #80

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

rkfg
Copy link
Contributor

@rkfg rkfg commented Sep 6, 2022

Amounts are hard to read without separators and in Bitcoin case the usual groups of three digits can be confusing because 1 BTC is 10e8 sats. Instead I implemented a better format proposed by satcomma. It's not exactly like the link describes because I replaced spaces with commas to make it look consistent with the main screen. Most amounts like channels and HTLCs don't need the BTC point because they're usually much smaller than 1 BTC so commas are fine. Total node capacities are usually greater than 1 BTC so it's appropriate there. I currently didn't patch the other screens that show amounts because of this reason.
2022-09-06_18-12-01

@rkfg
Copy link
Contributor Author

rkfg commented Sep 11, 2022

Also added displaying max HTLC, it depends on the formatting function so I included it here. Max HTLC is an important policy parameter that's used by some node operators to indicate that the channel is almost empty and can't accept big HTLCs to lower forwarding error count. Unlike min HTLC it's displayed in sats because max HTLC is usually a big number so it makes sense.
2022-09-11_19-50-17

@edouardparis
Copy link
Owner

Looks good to me ! (untested)

@edouardparis edouardparis merged commit 3f8f17c into edouardparis:master Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants