Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-01 16:41:51 +03:00
parent 23ea022a94
commit 79d96d3b8d

View file

@ -18,7 +18,6 @@ import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.toWrappedList
import com.tangem.core.ui.message.DialogMessage
import com.tangem.core.ui.message.EventMessageAction
import com.tangem.domain.card.BackupValidator
import com.tangem.domain.card.common.util.cardTypesResolver
import com.tangem.domain.card.repository.CardSdkConfigRepository
import com.tangem.domain.feedback.SendFeedbackEmailUseCase
@ -131,12 +130,9 @@ internal class UpgradeWalletModel @Inject constructor(
scanResponse: ScanResponse,
onSuccess: suspend () -> Unit,
) {
// Check if user attempted to upgrade before but something went wrong and a full reset is required
val userWallet = coldUserWalletBuilderFactory.create(scanResponse).build()
val isSameWalletButNotFinishedBackup = userWallet?.walletId == params.userWalletId &&
BackupValidator.isValidFull(scanResponse.card).not()
if (userWallet != null && isSameWalletButNotFinishedBackup) {
if (userWallet?.walletId == params.userWalletId) {
startResetCardsFlow.emit(userWallet)
return
}