lbry-desktop/ui/component/txoList/index.js
zeppi ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00

33 lines
1.2 KiB
JavaScript

import { connect } from 'react-redux';
import { doOpenModal } from 'redux/actions/app';
import { doFetchTxoPage, doFetchTransactions, doUpdateTxoPageParams } from 'redux/actions/wallet';
import {
selectIsFetchingTxos,
selectIsFetchingTransactions,
selectFetchingTxosError,
selectTransactionsFile,
selectTxoPage,
selectTxoPageNumber,
selectTxoItemCount,
} from 'redux/selectors/wallet';
import { withRouter } from 'react-router';
import TxoList from './view';
const select = (state) => ({
txoFetchError: selectFetchingTxosError(state),
txoPage: selectTxoPage(state),
txoPageNumber: selectTxoPageNumber(state),
txoItemCount: selectTxoItemCount(state),
loading: selectIsFetchingTxos(state),
isFetchingTransactions: selectIsFetchingTransactions(state),
transactionsFile: selectTransactionsFile(state),
});
const perform = (dispatch) => ({
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
fetchTxoPage: () => dispatch(doFetchTxoPage()),
fetchTransactions: () => dispatch(doFetchTransactions()),
updateTxoPageParams: (params) => dispatch(doUpdateTxoPageParams(params)),
});
export default withRouter(connect(select, perform)(TxoList));