diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-08-12 11:50:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-12 11:50:01 +0800 |
commit | 878a01a294c8dbc915ceb7a5f52f0006247fb4b4 (patch) | |
tree | b497e51e3adf3f2a6cb54d243bf3cd1af6892f80 /ui/app | |
parent | 1ad9c78bbe1c2966f6648cdb2e56292d4516bee6 (diff) | |
parent | b1f68ec9cd2549a7b52272407f1543ae0b1d9326 (diff) | |
download | tangerine-wallet-browser-878a01a294c8dbc915ceb7a5f52f0006247fb4b4.tar tangerine-wallet-browser-878a01a294c8dbc915ceb7a5f52f0006247fb4b4.tar.gz tangerine-wallet-browser-878a01a294c8dbc915ceb7a5f52f0006247fb4b4.tar.bz2 tangerine-wallet-browser-878a01a294c8dbc915ceb7a5f52f0006247fb4b4.tar.lz tangerine-wallet-browser-878a01a294c8dbc915ceb7a5f52f0006247fb4b4.tar.xz tangerine-wallet-browser-878a01a294c8dbc915ceb7a5f52f0006247fb4b4.tar.zst tangerine-wallet-browser-878a01a294c8dbc915ceb7a5f52f0006247fb4b4.zip |
Merge pull request #532 from MetaMask/logging-fix
Logging fix
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/store.js | 15 |
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) |