I'm looking for some feedback:
I'm working on a library that includes Currency and allows you to find the currency information by currency code.
I'm trying to support all the main platforms.
In some platforms, like Android and the JVM, and iOS i can look up the currency from the native platform, They contain most of the information (although iOS is a pain) other platforms like JS, WasmJs, Linux, there is no standard currency built in.
So in order to support those platforms we had to collect the resources from official sources, the same way its done in JS.
The problem is that the different platforms do not all have consistent data. e.g. the symbol returned for a particular code may not be the same across the native platforms. Or the name of the currency may not be the same.
Our data source is ISO-4217:
https://www.iso.org/iso-4217-currency-codes.html
In the future we'll use this to for formatting currency values.
So, we have two choices:
1. Allow the discrepancy on each platform, and live with it (tests are a pain, but we can sort that out)
2. Use the KMP resources we have put together and make the currency consistent across all platforms.
So, I wanted to get some feedback on what people think is more important, using the platform native currency information, or making it consistent for all KMP platforms.
In the end we'll make a decision based on how we are using it, but I'd like to make this useful for more than just us, which means I'm looking for arguments for and against the inconsistent native implementations.
So far, I'm leaning toward making it consistent so you'll know what you are getting, and it'll make testing and maintenance easier, but I'm sure we have not considered all angles.
The project is here in case anyone wants to take a look:
https://github.com/aughtone/aughtone-types