mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
Update currency.ts
This commit is contained in:
parent
09eb4cd3af
commit
7c5d4f0a60
@ -41,13 +41,12 @@ async function getPreferredCurrency(): Promise<FiatUnitType> {
|
|||||||
|
|
||||||
if (preferredCurrency) {
|
if (preferredCurrency) {
|
||||||
const parsedPreferredCurrency = JSON.parse(preferredCurrency);
|
const parsedPreferredCurrency = JSON.parse(preferredCurrency);
|
||||||
if (FiatUnit[parsedPreferredCurrency]) {
|
preferredFiatCurrency = FiatUnit[parsedPreferredCurrency.endPointKey];
|
||||||
preferredFiatCurrency = FiatUnit[parsedPreferredCurrency];
|
|
||||||
await DefaultPreference.setName(GROUP_IO_BLUEWALLET);
|
await DefaultPreference.setName(GROUP_IO_BLUEWALLET);
|
||||||
await DefaultPreference.set(PREFERRED_CURRENCY_STORAGE_KEY, preferredFiatCurrency.endPointKey);
|
await DefaultPreference.set(PREFERRED_CURRENCY_STORAGE_KEY, preferredFiatCurrency.endPointKey);
|
||||||
await DefaultPreference.set(PREFERRED_CURRENCY_LOCALE_STORAGE_KEY, preferredFiatCurrency.locale.replace('-', '_'));
|
await DefaultPreference.set(PREFERRED_CURRENCY_LOCALE_STORAGE_KEY, preferredFiatCurrency.locale.replace('-', '_'));
|
||||||
return parsedPreferredCurrency;
|
return preferredFiatCurrency;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return FiatUnit.USD;
|
return FiatUnit.USD;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user