From 107ed4af3cd9f4263a0fb85466d228eba75cfeda Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 27 Nov 2023 18:33:08 +0400 Subject: [PATCH] Updated on 2026-08-14 --- .../tangem/data/appcurrency/DefaultAppCurrencyRepository.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/app-currency/src/main/kotlin/com/tangem/data/appcurrency/DefaultAppCurrencyRepository.kt b/data/app-currency/src/main/kotlin/com/tangem/data/appcurrency/DefaultAppCurrencyRepository.kt index bce54591e8..b86e0bb03c 100644 --- a/data/app-currency/src/main/kotlin/com/tangem/data/appcurrency/DefaultAppCurrencyRepository.kt +++ b/data/app-currency/src/main/kotlin/com/tangem/data/appcurrency/DefaultAppCurrencyRepository.kt @@ -9,6 +9,7 @@ import com.tangem.datasource.local.appcurrency.AvailableAppCurrenciesStore import com.tangem.datasource.local.preferences.AppPreferencesStore import com.tangem.datasource.local.preferences.PreferencesKeys import com.tangem.datasource.local.preferences.utils.getObject +import com.tangem.datasource.local.preferences.utils.getSyncOrNull import com.tangem.datasource.local.preferences.utils.storeObject import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.appcurrency.repository.AppCurrencyRepository @@ -42,7 +43,9 @@ internal class DefaultAppCurrencyRepository( } withContext(dispatchers.io) { - fetchDefaultAppCurrency() + if (appPreferencesStore.getSyncOrNull(PreferencesKeys.SELECTED_APP_CURRENCY_KEY) == null) { + fetchDefaultAppCurrency() + } } } }