Skip to content

Commit

Permalink
✅ Fix transactionsList unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed May 15, 2019
1 parent 2aa5e99 commit 5fded51
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
1 change: 1 addition & 0 deletions i18n/locales/en/common.json
Expand Up @@ -174,6 +174,7 @@
"Filter": "Filter",
"Filter Transactions": "Filter Transactions",
"Filter by name": "Filter by name",
"Filter by name...": "Filter by name...",
"Filtered results: {{results}}": "Filtered results: {{results}}",
"Final confirmation": "Final confirmation",
"Followed Account": "Followed Account",
Expand Down
21 changes: 0 additions & 21 deletions src/components/transactions/transactionsList.js
@@ -1,5 +1,4 @@
import React from 'react';
import Waypoint from 'react-waypoint';
// import tableStyle from 'react-toolbox/lib/table/theme.css';
import Rows from './rows';

Expand All @@ -25,18 +24,12 @@ class TransactionsList extends React.Component {
}
}

// eslint-disable-next-line class-methods-use-this
isLargeScreen() {
return window.innerWidth > 768;
}

render() { // eslint-disable-line
const {
transactions,
dashboard,
address,
onClick,
loadMore,
showMore,
t,
} = this.props;
Expand Down Expand Up @@ -77,20 +70,6 @@ class TransactionsList extends React.Component {
onClick={onClick}
/>)
}
{
// the transaction list should be scrollable on a large screen
// otherwise (XS) the whole transaction box will be scrollable
// (see transactionOverview.js)
this.isLargeScreen()
? <Waypoint bottomOffset='-20%'
key={transactions.length}
onEnter={() => {
if (!dashboard) {
loadMore();
}
}}></Waypoint>
: null
}
</div>;
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/components/transactions/transactionsList.test.js
Expand Up @@ -11,8 +11,6 @@ import peersReducer from '../../store/reducers/peers';
import accountReducer from '../../store/reducers/account';
import transactionReducer from '../../store/reducers/transaction';
import delegateReducer from '../../store/reducers/delegate';
import accountMiddleware from '../../store/middlewares/account';
import peerMiddleware from '../../store/middlewares/peers';
import txFilters from '../../constants/transactionFilters';
import i18n from '../../i18n';

Expand All @@ -38,8 +36,6 @@ describe('TransactionsList', () => {
delegate: delegateReducer,
}, [
thunk,
peerMiddleware,
accountMiddleware,
]);

const options = {
Expand Down

0 comments on commit 5fded51

Please sign in to comment.