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

Balance (Sats) shown with rounding error #1549

Closed
ghost opened this issue Jul 18, 2023 · 0 comments · Fixed by #1568
Closed

Balance (Sats) shown with rounding error #1549

ghost opened this issue Jul 18, 2023 · 0 comments · Fixed by #1568
Labels
Bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jul 18, 2023

Describe the bug

On the main page, the total amount in sats gets displayed incorrectly (sometimes):

IMG_2591
IMG_2590

There seems to be some internal calculation/rounding error, when the total amount of sats is added up.

i have 3 outputs with amount_msat:
590395000
273824000
1937230000

and 2 channels with our_amount_msat:
1254905860
2000000000

They add up to

6056354860 not to
6056354859,999999

maybe you are using the frontend float number from the added channel sizes ("3,254,905.86") for internal calculations or so.

Reproduce

  • have a channel where our_amount_msat does not end with 00, e.g 1254905860msats

Zeus version

v0.7.6

Node interface

Core Lightning v23.05.2 (c-lightning-REST 0.10.5)

Network

Clearnet

Device

iphone 12

Device operating system

iOS 16.5.1

Log output

No response

@ghost ghost added the Bug Something isn't working label Jul 18, 2023
@kaloudis kaloudis reopened this Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant