Skip to content

Commit

Permalink
🔥 Remove searchAccount action from where unused
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Jul 31, 2019
1 parent 0063104 commit 97c87c8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
1 change: 0 additions & 1 deletion docs/EXTENSIONS_GUIDE.md
Expand Up @@ -35,7 +35,6 @@ actions={
loadSingleTransaction,
loadTransactions,
searchDelegate,
searchAccount,
}
```

Expand Down
Expand Up @@ -6,7 +6,6 @@ import { expect } from 'chai';
import { Provider } from 'react-redux';
import { BrowserRouter as Router } from 'react-router-dom';
import { prepareStore } from '../../../test/unit-test-utils/applicationInit';
import * as search from '../../actions/search';
import peersReducer from '../../store/reducers/peers';
import accountReducer from '../../store/reducers/account';
import searchReducer from '../../store/reducers/search';
Expand All @@ -29,7 +28,6 @@ import ExplorerTransactions from '../transactions/explorerTransactions';
describe('AccountTransaction Component', () => {
let wrapper;
let props;
let searchAccountSpy;

const store = prepareStore({
bookmarks: bookmarksReducer,
Expand All @@ -42,8 +40,6 @@ describe('AccountTransaction Component', () => {
}, [thunk]);

beforeEach(() => {
searchAccountSpy = spy(search, 'searchAccount');

props = {
match: {
url: `${routes.accounts.pathPrefix}${routes.accounts.path}/${accounts.genesis.address}`,
Expand All @@ -62,10 +58,6 @@ describe('AccountTransaction Component', () => {
</Provider>);
});

afterEach(() => {
searchAccountSpy.restore();
});

it('renders ExplorerTransactions', () => {
expect(wrapper).to.have.descendants(ExplorerTransactions);
});
Expand Down
9 changes: 1 addition & 8 deletions src/components/accountTransactions/index.js
@@ -1,17 +1,10 @@
/* istanbul ignore file */
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import { searchAccount } from '../../actions/search';
import AccountTransactions from './accountTransactions';

const mapStateToProps = state => ({
publicKey: state.account.publicKey,
account: state.search.accounts[state.search.lastSearch] || {},
delegate: state.search.delegates[state.search.lastSearch] || {},
});

const mapDispatchToProps = {
searchAccount,
};

export default connect(mapStateToProps, mapDispatchToProps)(translate()(AccountTransactions));
export default connect(mapStateToProps)(translate()(AccountTransactions));
2 changes: 0 additions & 2 deletions src/components/send/transactionStatus/index.js
Expand Up @@ -2,7 +2,6 @@
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import { getAccount } from '../../../utils/api/lsk/account';
import { searchAccount } from '../../../actions/search';
import { transactionBroadcasted, resetTransactionResult } from '../../../actions/transactions';
import TransactionStatus from './transactionStatus';
import withData from '../../../utils/withData';
Expand All @@ -15,7 +14,6 @@ const mapStateToProps = (state, ownProps) => ({

const mapDispatchToProps = {
resetTransactionResult,
searchAccount,
transactionBroadcasted,
};

Expand Down

0 comments on commit 97c87c8

Please sign in to comment.