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

Currency amount representation in the frontend and APIs #205

Open
da-kami opened this issue Aug 2, 2021 · 0 comments
Open

Currency amount representation in the frontend and APIs #205

da-kami opened this issue Aug 2, 2021 · 0 comments
Assignees

Comments

@da-kami
Copy link
Member

da-kami commented Aug 2, 2021

At the moment the UI deals with some currency amounts in BTC rather than SAT.
I'd recommend to introduce currency amount classes where the actual value is always in the smallest denomination (e.g. sats) and the class handles conversion for e.g. display. That class can then be part of the state.

Initially, we have a small implementation overhead, but in the long run I expect this to make the code more robust, testable and understandable (at the moment it is very hard to understand what a number value actually represents).

@da-kami da-kami mentioned this issue Aug 2, 2021
@da-kami da-kami self-assigned this Aug 5, 2021
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

No branches or pull requests

1 participant