2019-07-11 16:57:06 +02:00
|
|
|
const { createStore, applyMiddleware } = require('redux')
|
|
|
|
const { default: thunkMiddleware } = require('redux-thunk')
|
|
|
|
const { composeWithDevTools } = require('remote-redux-devtools')
|
2019-03-22 00:03:30 +01:00
|
|
|
const rootReducer = require('../ducks')
|
2016-04-14 00:28:44 +02:00
|
|
|
|
2019-07-11 16:57:06 +02:00
|
|
|
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,
|
|
|
|
),
|
|
|
|
))
|
2016-04-14 00:28:44 +02:00
|
|
|
}
|