diff --git a/renderer/reducers/activity/reducer.js b/renderer/reducers/activity/reducer.js index 81167c9fa53..ca0ad2588ed 100644 --- a/renderer/reducers/activity/reducer.js +++ b/renderer/reducers/activity/reducer.js @@ -256,19 +256,17 @@ export const resetPaginator = () => () => { * @returns {(dispatch:Function, getState:Function) => Promise} Thunk */ export const loadPage = (reload = false) => async (dispatch, getState) => { - const state = getState() - - if (isPageLoading(state)) { + if (isPageLoading(getState())) { return } dispatch(setPageLoading(true)) await dispatch(fetchInfo()) - const config = settingsSelectors.currentConfig(state) - const blockHeight = infoSelectors.blockHeight(state) + const config = settingsSelectors.currentConfig(getState()) + const blockHeight = infoSelectors.blockHeight(getState()) const thisPaginator = getPaginator() - if (reload || hasNextPage(state)) { + if (reload || hasNextPage(getState())) { const { pageSize } = config.activity const { items, hasNextPage: paginatorHasNextPage } = await thisPaginator(pageSize, blockHeight)