Create generateWallet reducer and add to combined reducer.
This commit is contained in:
parent
44701f8756
commit
fcc03dc6d9
|
@ -0,0 +1,29 @@
|
|||
import {GENERATE_WALLET_SHOW_PASSWORD, GENERATE_WALLET_FILE} from "actions/generateWallet";
|
||||
|
||||
|
||||
const initialState = {
|
||||
showPassword: false,
|
||||
generateWalletFile: false,
|
||||
generateWalletFileConfirm: false
|
||||
}
|
||||
|
||||
export function generateWallet(state = initialState, action) {
|
||||
switch (action.type) {
|
||||
case GENERATE_WALLET_SHOW_PASSWORD: {
|
||||
return {
|
||||
...state,
|
||||
showPassword: !state.showPassword
|
||||
}
|
||||
}
|
||||
|
||||
case GENERATE_WALLET_FILE: {
|
||||
return {
|
||||
...state,
|
||||
generateWalletFile: true
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
|
@ -3,8 +3,11 @@ import * as inbox from './inbox'
|
|||
import * as auth from './auth'
|
||||
import * as loginCR from './loginCR'
|
||||
import * as dashboard from './dashboard'
|
||||
import * as generateWallet from './generateWallet'
|
||||
import * as config from './config'
|
||||
|
||||
import { reducer as formReducer } from 'redux-form'
|
||||
|
||||
import {combineReducers} from 'redux';
|
||||
import {routerReducer} from 'react-router-redux'
|
||||
|
||||
|
@ -14,6 +17,8 @@ export default combineReducers({
|
|||
...auth,
|
||||
...dashboard,
|
||||
...loginCR,
|
||||
...generateWallet,
|
||||
...config,
|
||||
form: formReducer,
|
||||
routing: routerReducer
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue