Updated on 2026-08-14
This commit is contained in:
parent
b91efa6730
commit
d36d3f5427
13 changed files with 173 additions and 18 deletions
|
|
@ -5,6 +5,8 @@ import com.tangem.domain.card.repository.CardRepository
|
|||
import com.tangem.domain.card.repository.CardSdkConfigRepository
|
||||
import com.tangem.domain.demo.DemoConfig
|
||||
import com.tangem.domain.demo.IsDemoCardUseCase
|
||||
import com.tangem.domain.wallets.legacy.WalletsStateHolder
|
||||
import com.tangem.domain.wallets.usecase.IsNeedToBackupUseCase
|
||||
import com.tangem.tap.domain.TangemSdkManager
|
||||
import com.tangem.tap.domain.card.DefaultDerivePublicKeysUseCase
|
||||
import dagger.Module
|
||||
|
|
@ -62,4 +64,10 @@ internal object CardDomainModule {
|
|||
fun provideDerivePublicKeysUseCase(tangemSdkManager: TangemSdkManager): DerivePublicKeysUseCase {
|
||||
return DefaultDerivePublicKeysUseCase(tangemSdkManager = tangemSdkManager)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@ViewModelScoped
|
||||
fun provideIsNeedToBackupUseCase(walletStateHolder: WalletsStateHolder): IsNeedToBackupUseCase {
|
||||
return IsNeedToBackupUseCase(walletStateHolder)
|
||||
}
|
||||
}
|
||||
|
|
@ -450,6 +450,23 @@ private fun handleBackupAction(appState: () -> AppState?, action: BackupAction)
|
|||
Analytics.send(Onboarding.Backup.Finished(backupState.backupCardsNumber))
|
||||
}
|
||||
|
||||
userWalletsListManager.selectedUserWalletSync?.walletId?.let {
|
||||
scope.launch {
|
||||
userWalletsListManager.update(
|
||||
userWalletId = it,
|
||||
update = { wallet ->
|
||||
wallet.copy(
|
||||
scanResponse = updateScanResponseAfterBackup(
|
||||
scanResponse = wallet.scanResponse,
|
||||
backupState = backupState,
|
||||
),
|
||||
)
|
||||
},
|
||||
)
|
||||
store.dispatchOnMain(GlobalAction.UpdateUserWalletsListManager(userWalletsListManager))
|
||||
}
|
||||
}
|
||||
|
||||
val notActivatedCardIds = gatherCardIds(backupState, card)
|
||||
.mapNotNull { if (cardActivationIsFinished(it)) null else it }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue