Updated on 2026-08-14

This commit is contained in:
Tangem 2023-06-09 12:58:56 +03:00
parent 044b794535
commit ff129db7af
2 changed files with 3 additions and 12 deletions

View file

@ -6,7 +6,6 @@ import com.tangem.common.doOnFailure
import com.tangem.common.doOnResult
import com.tangem.common.doOnSuccess
import com.tangem.common.flatMap
import com.tangem.common.map
import com.tangem.domain.models.scan.ScanResponse
import com.tangem.tap.*
import com.tangem.tap.common.analytics.events.AnalyticsParam
@ -63,16 +62,12 @@ internal class WelcomeMiddleware {
private fun disableUserWalletsSaving() = scope.launch {
userWalletsListManager.clear()
.flatMap { walletStoresManager.clear() }
.flatMap { tangemSdkManager.clearSavedUserCodes() }
.map {
preferencesStorage.shouldSaveUserWallets = false
preferencesStorage.shouldSaveAccessCodes = false
}
.doOnFailure { e ->
Timber.e(e, "Unable to clear user wallets")
}
.doOnResult {
// !!! Workaround !!!
store.dispatchWithMain(WelcomeAction.CloseError)
store.dispatchWithMain(NavigationAction.PopBackTo(AppScreen.Home))
}