-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
remove trailing decimal point in format_satoshis #8134
base: master
Are you sure you want to change the base?
Conversation
Looks like the current formatting is wanted as this change breaks some tests. I think the current formatting is very uncommon and looks like an error. If you agree to this change I will fix the tests as well. |
I think the '.' is desirable in the GUI. |
It is rendered if the |
Even when the decimal point is the last character displayed, are you sure? I never saw that anywhere before and therefore thought its a bug in Electrum. Regarding the msat precision rendering: Good point, I didn't think about this and just checked how it behaves with my change. So, what happens in this case (if there are msat places) is: the decimal point is displayed again (which is good), but also if its really the last displayed character (which I think is bad) -> see screenshot below. So I would have to check how to also fix it for this case too, if you agree to this change in general now. |
I find it better, but I guess that is a question of taste. |
Well... For python devs that might look good, but those are not the target audience for Electrum... I hope? :D |
+1000 to this change. It's super annoying to have the trailing dot when you change the unit to sats, meaning you see it there for everything and you basically never need it. |
If "Zeros after decimal point" in Preferences is set to 0 and the amount is an integer (e.g. 1), it is currently displayed as
1.
which looks weird. This pull request removes the trailing decimal point in this case.I noticed the help dialog for "Zeros after decimal point" says explicitly "1." too, so not sure if this was on purpose? I'd strongly suggest to drop the . in this case...