Updated on 2026-08-14

This commit is contained in:
Tangem 2025-02-11 15:51:52 +03:00
parent 1ca7f17e37
commit d8a05732ee
5 changed files with 7 additions and 7 deletions

View file

@ -24,6 +24,7 @@ import com.tangem.tap.common.analytics.converters.ParamCardCurrencyConverter
import com.tangem.tap.common.analytics.events.IntroductionProcess
import com.tangem.tap.common.analytics.events.Shop
import com.tangem.tap.common.extensions.dispatchNavigationAction
import com.tangem.tap.common.extensions.dispatchWithMain
import com.tangem.tap.common.extensions.onUserWalletSelected
import com.tangem.tap.features.home.redux.HIDE_PROGRESS_DELAY
import com.tangem.tap.features.home.redux.HomeAction
@ -114,7 +115,7 @@ internal class HomeViewModel @Inject constructor(
},
)
store.dispatch(HomeAction.ScanInProgress(scanInProgress = false))
store.dispatchWithMain(HomeAction.ScanInProgress(scanInProgress = false))
delay(HIDE_PROGRESS_DELAY)
store.dispatchNavigationAction { push(AppRoute.Wallet) }

View file

@ -104,7 +104,7 @@ private fun proceedWithScanResponse(scanResponse: ScanResponse) = scope.launch {
}
.doOnSuccess {
sendSignedInCardAnalyticsEvent(scanResponse)
scope.launch { store.onUserWalletSelected(userWallet = userWallet) }
store.onUserWalletSelected(userWallet = userWallet)
}
.doOnResult {
navigateTo(AppRoute.Wallet)

View file

@ -263,7 +263,7 @@ object OnboardingHelper {
}
.doOnSuccess {
mainScope.launch { store.onUserWalletSelected(userWallet) }
store.dispatch(OnboardingWalletAction.WalletSaved(userWallet.walletId))
store.dispatchWithMain(OnboardingWalletAction.WalletSaved(userWallet.walletId))
}
}
}

View file

@ -16,7 +16,6 @@ import com.tangem.tap.common.extensions.inject
import com.tangem.tap.common.extensions.onUserWalletSelected
import com.tangem.tap.common.redux.AppState
import com.tangem.tap.features.onboarding.products.wallet.redux.OnboardingWalletAction
import com.tangem.tap.mainScope
import com.tangem.tap.proxy.redux.DaggerGraphState
import com.tangem.tap.scope
import com.tangem.tap.store
@ -90,9 +89,9 @@ internal class SaveWalletMiddleware {
Timber.e(error, "Unable to save user wallet")
}
.doOnSuccess {
mainScope.launch { store.onUserWalletSelected(userWallet) }
store.onUserWalletSelected(userWallet)
if (!shouldNavigateToWallet) {
store.dispatch(OnboardingWalletAction.WalletSaved(userWallet.walletId))
store.dispatchWithMain(OnboardingWalletAction.WalletSaved(userWallet.walletId))
}
}
.doOnResult { if (shouldNavigateToWallet) navigateToWallet() }

View file

@ -21,7 +21,7 @@
},
{
"name": "ONBOARDING_CODE_REFACTORING_ENABLED",
"version": "5.21.0"
"version": "5.22.0"
},
{
"name": "NAVIGATION_REFACTORING",