Updated on 2026-08-14

This commit is contained in:
Tangem 2022-01-28 12:22:21 +03:00
parent b971e1a746
commit 507a3f46f6
3 changed files with 4 additions and 7 deletions

View file

@ -237,11 +237,13 @@ private fun handleBackupAction(action: BackupAction) {
AccessCodeError.CodeTooShort
))
} else {
store.dispatch(BackupAction.SetAccessCodeError(null))
store.dispatch(BackupAction.SaveFirstAccessCode(action.accessCode))
}
}
is BackupAction.SaveAccessCodeConfirmation -> {
if (action.accessCodeConfirmation == backupState.accessCode) {
store.dispatch(BackupAction.SetAccessCodeError(null))
backupService.setAccessCode(action.accessCodeConfirmation)
store.dispatch(BackupAction.PrepareToWritePrimaryCard)
} else {

View file

@ -60,7 +60,7 @@ class BackupReducer {
state.copy(backupStep = BackupStep.SetAccessCode)
}
BackupAction.ShowEnterAccessCodeScreen -> {
state.copy(backupStep = BackupStep.EnterAccessCode)
state.copy(backupStep = BackupStep.EnterAccessCode, accessCodeError = null)
}
is BackupAction.SaveFirstAccessCode -> {
state.copy(

View file

@ -15,7 +15,6 @@ import com.tangem.common.core.CardIdDisplayFormat
import com.tangem.tangem_sdk_new.ui.widget.leapfrogWidget.LeapfrogWidget
import com.tangem.tap.common.extensions.hide
import com.tangem.tap.common.extensions.show
import com.tangem.tap.common.postUi
import com.tangem.tap.features.FragmentOnBackPressedHandler
import com.tangem.tap.features.addBackPressHandler
import com.tangem.tap.features.onboarding.products.wallet.redux.*
@ -253,15 +252,11 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
private fun showEnterAccessCode(state: BackupState) {
accessCodeDialog?.showEnterAccessCode()
accessCodeDialog?.showError(state.accessCodeError)
postUi(2000) { store.dispatch(BackupAction.SetAccessCodeError(null)) }
}
private fun showReenterAccessCode(state: BackupState) {
accessCodeDialog?.showReenterAccessCode()
accessCodeDialog?.showError(state.accessCodeError)
postUi(2000) { store.dispatch(BackupAction.SetAccessCodeError(null)) }
}
private fun showWritePrimaryCard(state: BackupState) {
@ -350,7 +345,7 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
tab_layout_backup_info.hide()
tv_body.text = text
btn_main_action.text = getText(R.string.common_continue)
btn_main_action.text = getText(R.string.onboarding_button_continue_wallet)
btn_alternative_action.hide()
btn_main_action.setOnClickListener {
lav_confetti.cancelAnimation()