Add support for currencies hard-pegged to other currencies:
[ ] Bug
[ ] New feature
[X] Enhancement
[ ] New component
[ ] Typo
I was missing the possibility convert the Bosnian mark. It usually isn't listed in exchange rate lists because it's pegged to the euro at a fixed rate. I added a function with hardcoded rates of several pegged currencies (this should be fine since the rates hardly ever change) and reworked the convertCurrency function so it checks whether any of the currencies on the input is a pegged one and if yes, it calculates its exchange rate based on the exchange rate of the base currency retrieved through the API and the hardcoded rate of the pegged currency.
I added a few more currencies, mainly for testing.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Signed-off-by: Michal Fabik michal.fabik@gmail.com
Add support for currencies hard-pegged to other currencies:
I was missing the possibility convert the Bosnian mark. It usually isn't listed in exchange rate lists because it's pegged to the euro at a fixed rate. I added a function with hardcoded rates of several pegged currencies (this should be fine since the rates hardly ever change) and reworked the
convertCurrency
function so it checks whether any of the currencies on the input is a pegged one and if yes, it calculates its exchange rate based on the exchange rate of the base currency retrieved through the API and the hardcoded rate of the pegged currency.I added a few more currencies, mainly for testing.
Pull Request Checklist:
bats tests
?