ACINQ / phoenix

Phoenix is a self-custodial Bitcoin wallet using Lightning to send/receive payments.
https://phoenix.acinq.co
Apache License 2.0
644 stars 97 forks source link

Adding support for Lebanese Pound (black market) #348

Closed robbiehanson closed 1 year ago

robbiehanson commented 1 year ago

As requested in issue #344

We were already fetching this exchange rate, since we were already using Yadio for another currency. So we just needed to add the currency, and a bit of extra logic to pull it from the fetched data.

Naming considerations:

Future work:

The CurrencyManager is currently fetching data from 5 different sources. It's not a ton of data, and the overhead isn't that bad. BUT... it's unnecessary work for nearly every user. For example, if you're only using the Euro or the US Dollar, then you only really need to fetch from 1 source.

The AppConfigurationManager.preferredFiatCurrencies already tells us which currencies are needed by the user within the UI. So I have a separate commit I'm working on that will optimize the CurrencyManager such that it only pulls the data it needs to. But it's a less trivial change so it's better to have it in a separate PR.