2020-04-10 19:31:36 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2021-10-17 10:36:14 +02:00
|
|
|
import { doFetchTxoPage, doFetchTransactions, doUpdateTxoPageParams } from 'redux/actions/wallet';
|
2020-04-10 19:31:36 +02:00
|
|
|
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,
|
2021-10-17 10:36:14 +02:00
|
|
|
} from 'redux/selectors/wallet';
|
2020-04-10 19:31:36 +02:00
|
|
|
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));
|