Add more fiat currencies using fx rates from FreeCurrencyAPI

This commit is contained in:
natsoni
2024-03-07 10:48:32 +01:00
parent bfaddfc345
commit f121d16544
7 changed files with 727 additions and 38 deletions

View File

@@ -35,6 +35,11 @@ export class FiatSelectorComponent implements OnInit {
this.stateService.fiatCurrency$.subscribe((fiat) => {
this.fiatForm.get('fiat')?.setValue(fiat);
});
if (!this.stateService.env.ADDITIONAL_CURRENCIES) {
this.currencies = this.currencies.filter((currency: any) => {
return ['AUD', 'CAD', 'EUR', 'JPY', 'GBP', 'CHF', 'USD'].includes(currency[0]);
});
}
}
changeFiat() {