lbry-desktop/ui/component/txoList/index.js
infinite-persistence b0193202d1
Re-add ability to export transactions (#5899)
* FileExporter: add 'fetch' hook + Web support

* Re-add ability to export transactions

Closes 4793: Export Wallet History For Taxation Purposes

* Move file-creation to the background.

Don't let the file-creation process block the GUI.

Requires lbry-redux update.

* Bump redux | doFetchTransactions: bump pageSize to 999999; remove doFetchSupport

* bump redux

Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
2021-04-23 12:10:37 -04:00

35 lines
1.1 KiB
JavaScript

import { connect } from 'react-redux';
import { doOpenModal } from 'redux/actions/app';
import {
selectIsFetchingTxos,
selectIsFetchingTransactions,
selectFetchingTxosError,
selectTransactionsFile,
selectTxoPage,
selectTxoPageNumber,
selectTxoItemCount,
doFetchTxoPage,
doFetchTransactions,
doUpdateTxoPageParams,
} from 'lbry-redux';
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));