millisatoshis is a string?
nicolasburtey opened this issue · comments
satoshis is returned as a number
millisatoshis as a string
Is that intended? Because of javascript issue with big numbers?
Yes.
Other libraries tend to use their favorite big number library as output, but that can cause problems with other apps where people who don't want to use OUR big number library do things like new TheirBigNumLib(millisats.toString(10), 10)
BigInt is finally supported in JavaScript, but everyone wants to support IE8 for all eternity, so any time a library uses anything modern they are yelled at.
This was a balance we struck.
If you have a better idea, we're open to discussing it / reviewing Pull Requests.
ok make sense. don't have a better idea but at least I understand what that is