Download all transactions in CSV
This commit is contained in:
parent
b3067473fc
commit
9a5c2cde9b
2 changed files with 15 additions and 2 deletions
|
@ -7,6 +7,7 @@ import {
|
||||||
selectTransactionListFilter,
|
selectTransactionListFilter,
|
||||||
doSetTransactionListFilter,
|
doSetTransactionListFilter,
|
||||||
selectIsFetchingTransactions,
|
selectIsFetchingTransactions,
|
||||||
|
selectTransactionItems,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import { withRouter } from 'react-router';
|
import { withRouter } from 'react-router';
|
||||||
import TransactionList from './view';
|
import TransactionList from './view';
|
||||||
|
@ -17,6 +18,7 @@ const select = state => ({
|
||||||
myClaims: selectAllMyClaimsByOutpoint(state),
|
myClaims: selectAllMyClaimsByOutpoint(state),
|
||||||
filterSetting: selectTransactionListFilter(state),
|
filterSetting: selectTransactionListFilter(state),
|
||||||
loading: selectIsFetchingTransactions(state),
|
loading: selectIsFetchingTransactions(state),
|
||||||
|
allTransactions: selectTransactionItems(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -18,13 +18,24 @@ type Props = {
|
||||||
setTransactionFilter: string => void,
|
setTransactionFilter: string => void,
|
||||||
slim?: boolean,
|
slim?: boolean,
|
||||||
title: string,
|
title: string,
|
||||||
|
allTransactions: Array<Transaction>,
|
||||||
transactions: Array<Transaction>,
|
transactions: Array<Transaction>,
|
||||||
transactionCount?: number,
|
transactionCount?: number,
|
||||||
history: { replace: string => void },
|
history: { replace: string => void },
|
||||||
};
|
};
|
||||||
|
|
||||||
function TransactionList(props: Props) {
|
function TransactionList(props: Props) {
|
||||||
const { emptyMessage, slim, filterSetting, title, transactions, loading, history, transactionCount } = props;
|
const {
|
||||||
|
emptyMessage,
|
||||||
|
slim,
|
||||||
|
filterSetting,
|
||||||
|
title,
|
||||||
|
transactions,
|
||||||
|
loading,
|
||||||
|
history,
|
||||||
|
transactionCount,
|
||||||
|
allTransactions,
|
||||||
|
} = props;
|
||||||
// Flow offers little support for Object.values() typing.
|
// Flow offers little support for Object.values() typing.
|
||||||
// https://github.com/facebook/flow/issues/2221
|
// https://github.com/facebook/flow/issues/2221
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
|
@ -49,7 +60,7 @@ function TransactionList(props: Props) {
|
||||||
{/* @if TARGET='app' */}
|
{/* @if TARGET='app' */}
|
||||||
{!slim && (
|
{!slim && (
|
||||||
<FileExporter
|
<FileExporter
|
||||||
data={transactions}
|
data={allTransactions}
|
||||||
label={__('Export')}
|
label={__('Export')}
|
||||||
title={__('Export Transactions')}
|
title={__('Export Transactions')}
|
||||||
filters={['nout']}
|
filters={['nout']}
|
||||||
|
|
Loading…
Reference in a new issue