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