waves icon indicating copy to clipboard operation
waves copied to clipboard

Currency amount representation in the frontend and APIs

Open da-kami opened this issue 4 years ago • 0 comments
trafficstars

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 avatar Aug 02 '21 00:08 da-kami