diff --git a/src/redux/ValidatorOnboarding/Deposit/slice.ts b/src/redux/ValidatorOnboarding/Deposit/slice.ts new file mode 100644 index 00000000..cf060bf3 --- /dev/null +++ b/src/redux/ValidatorOnboarding/Deposit/slice.ts @@ -0,0 +1,23 @@ +import { createSlice } from '@reduxjs/toolkit' + +type DepositState = { + isWalletConnected: boolean +} + +const initialState: DepositState = { + isWalletConnected: false, +} + +const depositSlice = createSlice({ + name: 'deposit', + initialState, + reducers: { + setIsWalletConnected: (state, action) => { + state.isWalletConnected = action.payload + }, + }, +}) + +export const { setIsWalletConnected } = depositSlice.actions + +export default depositSlice.reducer diff --git a/src/redux/store.ts b/src/redux/store.ts index 592f40af..06218390 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -1,9 +1,11 @@ import { configureStore } from '@reduxjs/toolkit' + +import themeReducer from './theme/slice' import deviceHealthReducer from './deviceHealthCheck/slice' import pinnedMessageReducer from './PinnedMessage/slice' import execClientReducer from './ValidatorOnboarding/ValidatorSetup/slice' -import themeReducer from './theme/slice' import keyGenerationReducer from './ValidatorOnboarding/KeyGeneration/slice' +import depositReducer from './ValidatorOnboarding/Deposit/slice' const store = configureStore({ reducer: { @@ -12,6 +14,7 @@ const store = configureStore({ execClient: execClientReducer, theme: themeReducer, keyGeneration: keyGenerationReducer, + deposit: depositReducer, }, })