diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-08-12 09:58:23 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-08-12 09:58:23 +0800 |
commit | 2b0c6953e27b937d8ff75aad00786e3501599a73 (patch) | |
tree | 8e4e7d0e99636e4fa1a06627fc71ef3886445d76 /ui/app/store.js | |
parent | b8856d765daeb9c3b5be9a3067f977d85222639c (diff) | |
download | tangerine-wallet-browser-2b0c6953e27b937d8ff75aad00786e3501599a73.tar tangerine-wallet-browser-2b0c6953e27b937d8ff75aad00786e3501599a73.tar.gz tangerine-wallet-browser-2b0c6953e27b937d8ff75aad00786e3501599a73.tar.bz2 tangerine-wallet-browser-2b0c6953e27b937d8ff75aad00786e3501599a73.tar.lz tangerine-wallet-browser-2b0c6953e27b937d8ff75aad00786e3501599a73.tar.xz tangerine-wallet-browser-2b0c6953e27b937d8ff75aad00786e3501599a73.tar.zst tangerine-wallet-browser-2b0c6953e27b937d8ff75aad00786e3501599a73.zip |
Create global variable that changes ui logging.
Diffstat (limited to 'ui/app/store.js')
-rw-r--r-- | ui/app/store.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/app/store.js b/ui/app/store.js index 723eba334..8800ca1ad 100644 --- a/ui/app/store.js +++ b/ui/app/store.js @@ -2,17 +2,17 @@ const createStore = require('redux').createStore const applyMiddleware = require('redux').applyMiddleware const thunkMiddleware = require('redux-thunk') const rootReducer = require('./reducers') -const developmentMode = require('../../app/scripts/config').developmentMode const createLogger = require('redux-logger') +global.METAMASK_DEBUG = false + module.exports = configureStore -const middlewares = [thunkMiddleware] +const loggerMiddleware = createLogger({ + predicate: () => global.METAMASK_DEBUG ? true : false +}) -if (developmentMode) { - const loggerMiddleware = createLogger() - middlewares.push(loggerMiddleware) -} +const middlewares = [thunkMiddleware, loggerMiddleware] const createStoreWithMiddleware = applyMiddleware(...middlewares)(createStore) |