Updated on 2026-08-14
This commit is contained in:
commit
26aefa3d13
3 changed files with 8 additions and 7 deletions
|
|
@ -199,7 +199,6 @@ class OnboardingWalletFragment :
|
|||
OnboardingWalletStep.CreateWallet -> setupCreateWalletState()
|
||||
OnboardingWalletStep.Backup -> setBackupState(
|
||||
state = state.backupState,
|
||||
isWallet2 = state.wallet2State != null,
|
||||
)
|
||||
|
||||
else -> {}
|
||||
|
|
@ -222,9 +221,9 @@ class OnboardingWalletFragment :
|
|||
animator.setupCreateWalletState()
|
||||
}
|
||||
|
||||
private fun setBackupState(state: BackupState, isWallet2: Boolean) {
|
||||
private fun setBackupState(state: BackupState) {
|
||||
when (state.backupStep) {
|
||||
BackupStep.InitBackup -> showBackupIntro(state, isWallet2)
|
||||
BackupStep.InitBackup -> showBackupIntro(state)
|
||||
BackupStep.ScanOriginCard -> showScanOriginCard()
|
||||
BackupStep.AddBackupCards -> showAddBackupCards(state)
|
||||
BackupStep.SetAccessCode -> showSetAccessCode()
|
||||
|
|
@ -236,7 +235,7 @@ class OnboardingWalletFragment :
|
|||
}
|
||||
}
|
||||
|
||||
private fun showBackupIntro(state: BackupState, isWallet2: Boolean) = with(binding) {
|
||||
private fun showBackupIntro(state: BackupState) = with(binding) {
|
||||
imvFirstBackupCard.show()
|
||||
imvSecondBackupCard.show()
|
||||
|
||||
|
|
@ -251,7 +250,7 @@ class OnboardingWalletFragment :
|
|||
|
||||
btnWalletAlternativeAction.text = getText(R.string.onboarding_button_skip_backup)
|
||||
btnWalletAlternativeAction.setOnClickListener { store.dispatch(BackupAction.SkipBackup) }
|
||||
btnWalletAlternativeAction.show(state.canSkipBackup && !isWallet2)
|
||||
btnWalletAlternativeAction.show(state.canSkipBackup)
|
||||
}
|
||||
animator.showBackupIntro(state)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ class DemoConfig {
|
|||
"FB20000000000186", // Note ETH
|
||||
"FB10000000000196", // Note BTC
|
||||
"FB30000000000176", // Wallet
|
||||
"FB40000000120060", // Wallet 2
|
||||
"FB04000000000152", // Wallet 2
|
||||
)
|
||||
|
||||
@Suppress("ClassOrdering")
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.tangem.domain.common
|
|||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.common.card.Card
|
||||
import com.tangem.common.card.FirmwareVersion
|
||||
import com.tangem.domain.demo.DemoConfig
|
||||
import com.tangem.domain.models.scan.CardDTO
|
||||
import java.util.*
|
||||
|
||||
|
|
@ -14,6 +15,7 @@ object TapWorkarounds {
|
|||
private const val TEST_CARD_BATCH = "99FF"
|
||||
private const val TEST_CARD_ID_STARTS_WITH = "FF99"
|
||||
private val backupRequiredFirmwareVersion = FirmwareVersion(major = 6, minor = 21)
|
||||
private val demoConfig = DemoConfig()
|
||||
|
||||
val CardDTO.isTangemTwins: Boolean
|
||||
get() = TwinsHelper.getTwinCardNumber(cardId) != null
|
||||
|
|
@ -26,7 +28,7 @@ object TapWorkarounds {
|
|||
|
||||
// for cards 6.21 and higher backup is not skippable
|
||||
val CardDTO.canSkipBackup: Boolean
|
||||
get() = this.firmwareVersion < backupRequiredFirmwareVersion
|
||||
get() = this.firmwareVersion < backupRequiredFirmwareVersion || demoConfig.isDemoCardId(cardId)
|
||||
|
||||
val CardDTO.useOldStyleDerivation: Boolean
|
||||
get() = batchId == "AC01" || batchId == "AC02" || batchId == "CB95"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue