Updated on 2026-08-14
This commit is contained in:
parent
5516e706aa
commit
73aaae287d
15 changed files with 252 additions and 163 deletions
|
|
@ -20,6 +20,7 @@ import com.tangem.domain.models.scan.CardDTO.Companion.RING_BATCH_IDS
|
|||
import com.tangem.domain.models.scan.CardDTO.Companion.RING_BATCH_PREFIX
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.wallets.builder.UserWalletBuilder
|
||||
import com.tangem.domain.wallets.builder.UserWalletIdBuilder
|
||||
import com.tangem.domain.wallets.models.Artwork
|
||||
import com.tangem.feature.onboarding.data.model.CreateWalletResponse
|
||||
import com.tangem.feature.onboarding.presentation.wallet2.analytics.SeedPhraseSource
|
||||
|
|
@ -203,9 +204,10 @@ private fun handleFinishOnboardind(scanResponse: ScanResponse) {
|
|||
val backupState = store.state.onboardingWalletState.backupState
|
||||
val updatedScanResponse = updateScanResponseAfterBackup(scanResponse, backupState)
|
||||
|
||||
if (backupState.hasRing) {
|
||||
val userWalletId = UserWalletIdBuilder.scanResponse(scanResponse).build()
|
||||
if (backupState.hasRing && userWalletId != null) {
|
||||
scope.launch {
|
||||
store.inject(DaggerGraphState::walletsRepository).setHasWalletsWithRing()
|
||||
store.inject(DaggerGraphState::walletsRepository).setHasWalletsWithRing(userWalletId = userWalletId)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,14 @@ private object BackupReducer {
|
|||
is BackupAction.FinishBackup -> state.copy(backupStep = BackupStep.Finished)
|
||||
BackupAction.OnAccessCodeDialogClosed -> state.copy(backupStep = BackupStep.AddBackupCards)
|
||||
BackupAction.DiscardBackup -> BackupState()
|
||||
is BackupAction.SetHasRing -> state.copy(hasRing = action.hasRing)
|
||||
is BackupAction.SetHasRing -> {
|
||||
// Don't update if state.has ring is already true
|
||||
if (state.hasRing) {
|
||||
state
|
||||
} else {
|
||||
state.copy(hasRing = action.hasRing)
|
||||
}
|
||||
}
|
||||
else -> state
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue