fix: setPreferredCurrency function

This commit is contained in:
Ivan Vershigora 2024-02-17 10:49:06 +00:00
parent 59285190bf
commit 691b09afe4
No known key found for this signature in database
GPG Key ID: DCCF7FB5ED2CEBD7

View File

@ -28,6 +28,7 @@ let lastTimeUpdateExchangeRateWasCalled: number = 0;
let skipUpdateExchangeRate: boolean = false;
async function setPreferredCurrency(item: FiatUnitType): Promise<void> {
await AsyncStorage.setItem(PREFERRED_CURRENCY_STORAGE_KEY, JSON.stringify(item));
await DefaultPreference.setName(GROUP_IO_BLUEWALLET);
await DefaultPreference.set(PREFERRED_CURRENCY_STORAGE_KEY, item.endPointKey);
await DefaultPreference.set(PREFERRED_CURRENCY_LOCALE_STORAGE_KEY, item.locale.replace('-', '_'));