2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-09-24 05:44:42 +02:00
|
|
|
import { selectClaimedRewardsByTransactionId } from 'lbryinc';
|
2018-10-29 18:23:53 +01:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2019-05-10 09:24:35 +02:00
|
|
|
import {
|
|
|
|
selectAllMyClaimsByOutpoint,
|
2019-05-14 06:52:51 +02:00
|
|
|
selectSupportsByOutpoint,
|
2019-05-10 09:24:35 +02:00
|
|
|
selectTransactionListFilter,
|
|
|
|
doSetTransactionListFilter,
|
2019-06-17 22:32:38 +02:00
|
|
|
selectIsFetchingTransactions,
|
2019-05-10 09:24:35 +02:00
|
|
|
} from 'lbry-redux';
|
2019-09-23 04:47:07 +02:00
|
|
|
import { withRouter } from 'react-router';
|
2017-12-21 22:08:54 +01:00
|
|
|
import TransactionList from './view';
|
2017-05-11 02:59:47 +02:00
|
|
|
|
2017-09-18 02:52:57 +02:00
|
|
|
const select = state => ({
|
|
|
|
rewards: selectClaimedRewardsByTransactionId(state),
|
2019-05-14 06:52:51 +02:00
|
|
|
mySupports: selectSupportsByOutpoint(state),
|
2019-05-10 09:24:35 +02:00
|
|
|
myClaims: selectAllMyClaimsByOutpoint(state),
|
2018-10-18 19:56:10 +02:00
|
|
|
filterSetting: selectTransactionListFilter(state),
|
2019-06-17 22:32:38 +02:00
|
|
|
loading: selectIsFetchingTransactions(state),
|
2017-09-18 02:52:57 +02:00
|
|
|
});
|
|
|
|
|
2017-09-04 19:35:41 +02:00
|
|
|
const perform = dispatch => ({
|
2018-10-29 18:23:53 +01:00
|
|
|
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
2018-10-18 19:56:10 +02:00
|
|
|
setTransactionFilter: filterSetting => dispatch(doSetTransactionListFilter(filterSetting)),
|
2017-09-04 19:35:41 +02:00
|
|
|
});
|
|
|
|
|
2019-09-23 04:47:07 +02:00
|
|
|
export default withRouter(
|
|
|
|
connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(TransactionList)
|
|
|
|
);
|