2020-04-10 19:31:36 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
|
|
|
import {
|
|
|
|
selectIsFetchingTxos,
|
2021-04-23 18:10:37 +02:00
|
|
|
selectIsFetchingTransactions,
|
2020-04-10 19:31:36 +02:00
|
|
|
selectFetchingTxosError,
|
2021-04-23 18:10:37 +02:00
|
|
|
selectTransactionsFile,
|
2020-04-10 19:31:36 +02:00
|
|
|
selectTxoPage,
|
|
|
|
selectTxoPageNumber,
|
|
|
|
selectTxoItemCount,
|
|
|
|
doFetchTxoPage,
|
2021-04-23 18:10:37 +02:00
|
|
|
doFetchTransactions,
|
2020-04-10 19:31:36 +02:00
|
|
|
doUpdateTxoPageParams,
|
|
|
|
} from 'lbry-redux';
|
|
|
|
import { withRouter } from 'react-router';
|
|
|
|
import TxoList from './view';
|
|
|
|
|
2021-04-23 18:10:37 +02:00
|
|
|
const select = (state) => ({
|
2020-04-10 19:31:36 +02:00
|
|
|
txoFetchError: selectFetchingTxosError(state),
|
|
|
|
txoPage: selectTxoPage(state),
|
|
|
|
txoPageNumber: selectTxoPageNumber(state),
|
|
|
|
txoItemCount: selectTxoItemCount(state),
|
|
|
|
loading: selectIsFetchingTxos(state),
|
2021-04-23 18:10:37 +02:00
|
|
|
isFetchingTransactions: selectIsFetchingTransactions(state),
|
|
|
|
transactionsFile: selectTransactionsFile(state),
|
2020-04-10 19:31:36 +02:00
|
|
|
});
|
|
|
|
|
2021-04-23 18:10:37 +02:00
|
|
|
const perform = (dispatch) => ({
|
2020-04-10 19:31:36 +02:00
|
|
|
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
|
|
|
fetchTxoPage: () => dispatch(doFetchTxoPage()),
|
2021-04-23 18:10:37 +02:00
|
|
|
fetchTransactions: () => dispatch(doFetchTransactions()),
|
|
|
|
updateTxoPageParams: (params) => dispatch(doUpdateTxoPageParams(params)),
|
2020-04-10 19:31:36 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default withRouter(connect(select, perform)(TxoList));
|