diff --git a/src/actions/SelectedAccountActions.js b/src/actions/SelectedAccountActions.js index 02826e00..f10d1414 100644 --- a/src/actions/SelectedAccountActions.js +++ b/src/actions/SelectedAccountActions.js @@ -185,7 +185,6 @@ export const observe = (prevState: State, action: Action): AsyncAction => async const status = getAccountStatus(state, newState); newState.notification = status || null; newState.shouldRender = status ? status.shouldRender : true; - // check if newState is different than previous state const stateChanged = reducerUtils.observeChanges(prevState.selectedAccount, newState, ['location', 'account', 'network', 'discovery', 'tokens', 'pending', 'notification', 'shouldRender']); if (stateChanged) { diff --git a/src/reducers/utils/index.js b/src/reducers/utils/index.js index c8b8d56f..8a3ded63 100644 --- a/src/reducers/utils/index.js +++ b/src/reducers/utils/index.js @@ -128,7 +128,7 @@ export const observeChanges = (prev: ?(Object | Array), current: ?(Object | if (prev instanceof Object && current instanceof Object) { for (let i = 0; i < fields.length; i++) { const key = fields[i]; - if (Array.isArray(prev[key]) && Array.isArray(current[key])) return prev[key].length !== current[key].length; + if (Array.isArray(prev[key]) && Array.isArray(current[key]) && prev[key].length !== current[key].length) return true; if (prev[key] !== current[key]) return true; } }