fix validator setup redux

This commit is contained in:
Hristo Nedelkov 2023-10-10 12:01:31 +03:00
parent 18823f7869
commit c0ce5da39f
2 changed files with 10 additions and 1 deletions

View File

@ -61,7 +61,13 @@ const ContinueButton = () => {
dispatch(setActiveStep(activeStep + 1))
}
}
const handleStep2 = () => {
if(subStepValidatorSetup === 3) {
return dispatch(setActiveStep(activeStep + 1))
}
dispatch(setSubStepValidatorSetup(subStepValidatorSetup + 1))
}
const handleStep4 = () => {
if (!isConfirmPhraseStage && recoveryMechanism === KEYSTORE_FILES) {
return dispatch(setActiveStep(activeStep + 1))
@ -88,6 +94,8 @@ const ContinueButton = () => {
const continueHandler = () => {
if (activeStep === 1) {
handleStep1()
} else if (activeStep === 2) {
handleStep2()
} else if (activeStep === 4) {
handleStep4()

View File

@ -3,6 +3,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit'
type ValidatorOnboardingState = {
activeStep: number
subStepValidatorSetup: number
}
const initialState: ValidatorOnboardingState = {