blob: 17f94f23039d5f9e9e31b7d66189f8e094e59105 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
const extend = require('xtend')
//
// Sub-Reducers take in the complete state and return their sub-state
//
const reduceIdentities = require('./reducers/identities')
const reduceMetamask = require('./reducers/metamask')
const reduceApp = require('./reducers/app')
module.exports = rootReducer
function rootReducer (state, action) {
// clone
state = extend(state)
//
// Identities
//
state.identities = reduceIdentities(state, action)
//
// MetaMask
//
state.metamask = reduceMetamask(state, action)
//
// AppState
//
state.appState = reduceApp(state, action)
return state
}
|