aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/store.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/ui/app/store.js b/ui/app/store.js
index ab6422e73..8d891bdc9 100644
--- a/ui/app/store.js
+++ b/ui/app/store.js
@@ -1,17 +1,20 @@
const createStore = require('redux').createStore
const applyMiddleware = require('redux').applyMiddleware
const thunkMiddleware = require('redux-thunk')
-const createLogger = require('redux-logger')
const rootReducer = require('./reducers')
+const createLogger = require('redux-logger')
+
+global.METAMASK_DEBUG = false
module.exports = configureStore
-const loggerMiddleware = createLogger()
+const loggerMiddleware = createLogger({
+ predicate: () => global.METAMASK_DEBUG,
+})
+
+const middlewares = [thunkMiddleware, loggerMiddleware]
-const createStoreWithMiddleware = applyMiddleware(
- thunkMiddleware,
- loggerMiddleware
-)(createStore)
+const createStoreWithMiddleware = applyMiddleware(...middlewares)(createStore)
function configureStore (initialState) {
return createStoreWithMiddleware(rootReducer, initialState)