feat: add redux and wallet connected state
This commit is contained in:
parent
52bcbc0dce
commit
eff6fc4a75
|
@ -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
|
|
@ -1,9 +1,11 @@
|
||||||
import { configureStore } from '@reduxjs/toolkit'
|
import { configureStore } from '@reduxjs/toolkit'
|
||||||
|
|
||||||
|
import themeReducer from './theme/slice'
|
||||||
import deviceHealthReducer from './deviceHealthCheck/slice'
|
import deviceHealthReducer from './deviceHealthCheck/slice'
|
||||||
import pinnedMessageReducer from './PinnedMessage/slice'
|
import pinnedMessageReducer from './PinnedMessage/slice'
|
||||||
import execClientReducer from './ValidatorOnboarding/ValidatorSetup/slice'
|
import execClientReducer from './ValidatorOnboarding/ValidatorSetup/slice'
|
||||||
import themeReducer from './theme/slice'
|
|
||||||
import keyGenerationReducer from './ValidatorOnboarding/KeyGeneration/slice'
|
import keyGenerationReducer from './ValidatorOnboarding/KeyGeneration/slice'
|
||||||
|
import depositReducer from './ValidatorOnboarding/Deposit/slice'
|
||||||
|
|
||||||
const store = configureStore({
|
const store = configureStore({
|
||||||
reducer: {
|
reducer: {
|
||||||
|
@ -12,6 +14,7 @@ const store = configureStore({
|
||||||
execClient: execClientReducer,
|
execClient: execClientReducer,
|
||||||
theme: themeReducer,
|
theme: themeReducer,
|
||||||
keyGeneration: keyGenerationReducer,
|
keyGeneration: keyGenerationReducer,
|
||||||
|
deposit: depositReducer,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue