how should we handle BigDecimal and monetary value...
# multiplatform
b
how should we handle BigDecimal and monetary values in KMM ?
until that is resolved, I'd do fixed-point manually for monetary units. Int + fixed offset of 2 should cover modern currencies and most reasonable values. Long + fixed offset of 8 will cover all Satoshis that can possibly exist. should be fine unless you're trying to express the world GDP in units of ZWL or something extreme like that
b
thanks @ephemient
m
I use expect / actual to do this, for example on android I use actual implementation of BigDecimal
👍 1
e
you can do that, and there's polyfill support for the JS decimal proposal as well, but on native you'll have to pull in something like GMP or OpenSSL/bn
👍 1