Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-25 17:17:12 +04:00
parent 52bf5cbb58
commit 9bd16deeb4
23 changed files with 245 additions and 151 deletions

View file

@ -1,7 +0,0 @@
<?xml version="1.0" ?>
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>SuspendFunSwallowedCancellation:DefaultSettingsRepository.kt$DefaultSettingsRepository$runCatching</ID>
</CurrentIssues>
</SmellBaseline>

View file

@ -13,6 +13,7 @@ import com.tangem.domain.settings.repositories.SettingsRepository
import com.tangem.domain.settings.usercountry.models.GB_COUNTRY
import com.tangem.domain.settings.usercountry.models.UserCountry
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import com.tangem.utils.coroutines.runSuspendCatching
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
@ -153,7 +154,7 @@ internal class DefaultSettingsRepository(
}
withContext(dispatchers.io) {
val country = runCatching { tangemTechApi.getUserCountryCode() }
val country = runSuspendCatching { tangemTechApi.getUserCountryCode() }
.fold(
onSuccess = GeoResponse::code,
onFailure = { Locale.getDefault().country },