mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-03-02 20:10:45 +00:00
feat: add state and reducer for is confirm phrase stage
This commit is contained in:
parent
62b8bd8a5f
commit
8358f8593c
@ -6,6 +6,7 @@ type KeyGenerationState = {
|
|||||||
isRightPhrase: boolean
|
isRightPhrase: boolean
|
||||||
validWords: boolean[]
|
validWords: boolean[]
|
||||||
generatedMnemonic: string[]
|
generatedMnemonic: string[]
|
||||||
|
isConfirmPhraseStage: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
type wordProps = {
|
type wordProps = {
|
||||||
@ -19,6 +20,7 @@ const initialState: KeyGenerationState = {
|
|||||||
isRightPhrase: false,
|
isRightPhrase: false,
|
||||||
validWords: Array(24).fill(true),
|
validWords: Array(24).fill(true),
|
||||||
generatedMnemonic: Array(24).fill(''),
|
generatedMnemonic: Array(24).fill(''),
|
||||||
|
isConfirmPhraseStage: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
const keyGenerationSlice = createSlice({
|
const keyGenerationSlice = createSlice({
|
||||||
@ -45,6 +47,9 @@ const keyGenerationSlice = createSlice({
|
|||||||
setGeneratedMnemonic: (state, action: PayloadAction<string[]>) => {
|
setGeneratedMnemonic: (state, action: PayloadAction<string[]>) => {
|
||||||
state.generatedMnemonic = action.payload
|
state.generatedMnemonic = action.payload
|
||||||
},
|
},
|
||||||
|
setIsConfirmPhraseStage: (state, action: PayloadAction<boolean>) => {
|
||||||
|
state.isConfirmPhraseStage = action.payload
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -55,6 +60,7 @@ export const {
|
|||||||
setIsRightPhrase,
|
setIsRightPhrase,
|
||||||
setValidWords,
|
setValidWords,
|
||||||
setGeneratedMnemonic,
|
setGeneratedMnemonic,
|
||||||
|
setIsConfirmPhraseStage,
|
||||||
} = keyGenerationSlice.actions
|
} = keyGenerationSlice.actions
|
||||||
|
|
||||||
export default keyGenerationSlice.reducer
|
export default keyGenerationSlice.reducer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user