/
index.js
28 lines (24 loc) 路 895 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* istanbul ignore file */
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import { getAccount } from '../../../utils/api/lsk/account';
import { transactionBroadcasted, resetTransactionResult } from '../../../actions/transactions';
import TransactionStatus from './transactionStatus';
import withData from '../../../utils/withData';
const mapStateToProps = (state, ownProps) => ({
detailAccount: state.search.accounts[ownProps.fields.recipient.address] || {},
bookmarks: state.bookmarks,
transactions: state.transactions,
});
const mapDispatchToProps = {
resetTransactionResult,
transactionBroadcasted,
};
const apis = {
recipientAccount: {
apiUtil: (liskAPIClient, params) => getAccount({ liskAPIClient, ...params }),
},
};
export default connect(mapStateToProps, mapDispatchToProps)(
withData(apis)(translate()(TransactionStatus)),
);