aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/config.js1
-rw-r--r--ui/app/store.js15
2 files changed, 9 insertions, 7 deletions
diff --git a/app/scripts/config.js b/app/scripts/config.js
index 5f6ffd936..ba012c6b8 100644
--- a/app/scripts/config.js
+++ b/app/scripts/config.js
@@ -11,4 +11,3 @@ module.exports = {
classic: CLASSIC_RPC_URL,
},
}
-
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)