aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/store/store.js
blob: 2edb6a7d38b2df23dccd53859226134fcc9e6ac5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const { createStore, applyMiddleware } = require('redux')
const { default: thunkMiddleware } = require('redux-thunk')
const { composeWithDevTools } = require('remote-redux-devtools')
const rootReducer = require('../ducks')

module.exports = function configureStore (initialState) {
  const composeEnhancers = composeWithDevTools({
    name: 'MetaMask',
    hostname: 'localhost',
    port: 8000,
    realtime: Boolean(process.env.METAMASK_DEBUG),
  })
  return createStore(rootReducer, initialState, composeEnhancers(
    applyMiddleware(
      thunkMiddleware,
    ),
  ))
}