From 035a094201177d23971d996675db11b376d648f2 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 27 Jan 2026 16:46:19 +0400 Subject: [PATCH] Updated on 2026-08-14 --- .../impl/entry/model/YieldSupplyEntryModel.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/entry/model/YieldSupplyEntryModel.kt b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/entry/model/YieldSupplyEntryModel.kt index 2bd65b5bf0..90a25adf75 100644 --- a/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/entry/model/YieldSupplyEntryModel.kt +++ b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/entry/model/YieldSupplyEntryModel.kt @@ -14,6 +14,7 @@ import com.tangem.features.yield.supply.api.YieldSupplyEntryComponent import com.tangem.features.yield.supply.api.entry.YieldSupplyEntryRoute import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import timber.log.Timber import javax.inject.Inject @@ -43,11 +44,15 @@ internal class YieldSupplyEntryModel @Inject constructor( cryptoCurrencyId = cryptoCurrency.id, ).onLeft { error -> Timber.e("Failed to get CryptoCurrencyStatus: $error") - router.pop() + withContext(dispatchers.mainImmediate) { + router.pop() + } }.onRight { cryptoCurrencyStatus -> - val route = getInitialRoute(cryptoCurrencyStatus) - if (route != null) { - router.replaceCurrent(route) + withContext(dispatchers.mainImmediate) { + val route = getInitialRoute(cryptoCurrencyStatus) + if (route != null) { + router.replaceCurrent(route) + } } } }