fix: remove confirm phrase stage if change step

This commit is contained in:
RadoslavDimchev 2023-09-07 15:22:26 +03:00
parent 042b0fd0cb
commit f4af9dab4a
1 changed files with 9 additions and 1 deletions

View File

@ -33,11 +33,12 @@ const ValidatorOnboarding = () => {
const changeActiveStep = (step: number) => {
setActiveStep(step)
removeCopyPastePhraseInfoBox()
removeConfirmPhraseStage()
}
const continueHandler = () => {
if (activeStep === 4 && isConfirmPhraseStage === false) {
setIsConfirmPhraseStage(true)
return setIsConfirmPhraseStage(true)
} else if (activeStep === 3 && subStepValidatorSetup < 3) {
setSubStepValidatorSetup(subStepValidatorSetup + 1)
} else if (activeStep < 5) {
@ -49,6 +50,7 @@ const ValidatorOnboarding = () => {
navigate('/')
}
removeCopyPastePhraseInfoBox()
removeConfirmPhraseStage()
}
const removeCopyPastePhraseInfoBox = () => {
@ -57,6 +59,12 @@ const ValidatorOnboarding = () => {
}
}
const removeConfirmPhraseStage = () => {
if (isConfirmPhraseStage) {
setIsConfirmPhraseStage(false)
}
}
return (
<div className="gradient-wrapper">
<YStack