FIX: change faulty exchange rate API

This commit is contained in:
overtorment 2023-01-29 18:09:07 +00:00
parent 2c4fa5d784
commit 96b676603f

View file

@ -53,6 +53,9 @@ async function _restoreSavedPreferredFiatCurrencyFromStorage() {
if (preferredFiatCurrency === null) {
throw Error('No Preferred Fiat selected');
}
preferredFiatCurrency = FiatUnit[preferredFiatCurrency.endPointKey] || preferredFiatCurrency;
// ^^^ in case configuration in json file changed (and is different from what we stored) we reload it
} catch (_) {
const deviceCurrencies = RNLocalize.getCurrencies();
if (Object.keys(FiatUnit).some(unit => unit === deviceCurrencies[0])) {