From e34bd123a428a09c8214998e6ef638336824a7f7 Mon Sep 17 00:00:00 2001 From: Vit Stanislav Date: Fri, 16 Feb 2018 11:26:00 +0100 Subject: [PATCH] Prevent loading bar for showing on every new block - Closes #375 --- src/store/middlewares/loadingBar.js | 4 +++- src/store/middlewares/loadingBar.test.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/store/middlewares/loadingBar.js b/src/store/middlewares/loadingBar.js index 9357a83e5b..e9d98c3007 100644 --- a/src/store/middlewares/loadingBar.js +++ b/src/store/middlewares/loadingBar.js @@ -1,6 +1,8 @@ import actionsType from '../../constants/actions'; -const ignoredLoadingActionKeys = ['loader/status']; +const ignoredLoadingActionKeys = [ + 'transactions', // because this is called every 10 seconds and the app doesn't look good with so much loading going on. +]; const loadingBarMiddleware = () => next => (action) => { switch (action.type) { diff --git a/src/store/middlewares/loadingBar.test.js b/src/store/middlewares/loadingBar.test.js index 3f0610e126..978f451304 100644 --- a/src/store/middlewares/loadingBar.test.js +++ b/src/store/middlewares/loadingBar.test.js @@ -7,7 +7,7 @@ import actionType from '../../constants/actions'; describe('LoadingBar middleware', () => { let store; let next; - const ignoredLoadingActionKeys = ['loader/status']; + const ignoredLoadingActionKeys = ['transactions']; beforeEach(() => { store = stub();