diff --git a/apps/block_scout_web/assets/__tests__/pages/address.js b/apps/block_scout_web/assets/__tests__/pages/address.js index 5e87b5b73d..96981a6f5a 100644 --- a/apps/block_scout_web/assets/__tests__/pages/address.js +++ b/apps/block_scout_web/assets/__tests__/pages/address.js @@ -203,28 +203,3 @@ describe('RECEIVED_NEW_TRANSACTION', () => { expect(output.transactions).toEqual([]) }) }) - -describe('RECEIVED_NEXT_PAGE', () => { - test('with new transaction page', () => { - const state = Object.assign({}, initialState, { - loadingNextPage: true, - nextPageUrl: '1', - transactions: [{ transactionHash: 1, transactionHtml: 'test 1' }] - }) - const action = { - type: 'RECEIVED_NEXT_PAGE', - msg: { - nextPageUrl: '2', - transactions: [{ transactionHash: 2, transactionHtml: 'test 2' }] - } - } - const output = reducer(state, action) - - expect(output.loadingNextPage).toEqual(false) - expect(output.nextPageUrl).toEqual('2') - expect(output.transactions).toEqual([ - { transactionHash: 1, transactionHtml: 'test 1' }, - { transactionHash: 2, transactionHtml: 'test 2' } - ]) - }) -}) diff --git a/apps/block_scout_web/assets/js/pages/address.js b/apps/block_scout_web/assets/js/pages/address.js index c3b3b324e8..15cbd1ea21 100644 --- a/apps/block_scout_web/assets/js/pages/address.js +++ b/apps/block_scout_web/assets/js/pages/address.js @@ -29,7 +29,7 @@ export const initialState = { beyondPageOne: null } -function reducer (state = initialState, action) { +export function reducer (state = initialState, action) { switch (action.type) { case 'PAGE_LOAD': case 'ELEMENTS_LOAD': { @@ -99,14 +99,6 @@ function reducer (state = initialState, action) { balance: action.msg.balance }) } - case 'RECEIVED_NEXT_PAGE': { - return Object.assign({}, state, { - transactions: [ - ...state.transactions, - ...action.msg.transactions - ] - }) - } default: return state }