Skip to content

Commit

Permalink
allowing generateStore to be called with default state
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Mar 22, 2018
1 parent f57932b commit 5a736fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generateStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import createSagaMiddleware from 'redux-saga'
import rootSaga from './rootSaga'
import reducers from './reducer' // todo rename file

function generateStore(options, appReducers = {}) {
function generateStore(options, appReducers = {}, defaultState = {}) {
// Redux DevTools
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

var preloadedState = {
var preloadedState = Object.assign({}, defaultState, {
accounts: {},
contracts: {},
//web3: {}
}
})

// create the saga middleware
const sagaMiddleware = createSagaMiddleware()
Expand Down

0 comments on commit 5a736fd

Please sign in to comment.