Download all transactions in CSV

This commit is contained in:
Lukewh 2020-02-14 17:44:51 +00:00 committed by Sean Yesmunt
parent b3067473fc
commit 9a5c2cde9b
2 changed files with 15 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import {
selectTransactionListFilter,
doSetTransactionListFilter,
selectIsFetchingTransactions,
selectTransactionItems,
} from 'lbry-redux';
import { withRouter } from 'react-router';
import TransactionList from './view';
@ -17,6 +18,7 @@ const select = state => ({
myClaims: selectAllMyClaimsByOutpoint(state),
filterSetting: selectTransactionListFilter(state),
loading: selectIsFetchingTransactions(state),
allTransactions: selectTransactionItems(state),
});
const perform = dispatch => ({

View file

@ -18,13 +18,24 @@ type Props = {
setTransactionFilter: string => void,
slim?: boolean,
title: string,
allTransactions: Array<Transaction>,
transactions: Array<Transaction>,
transactionCount?: number,
history: { replace: string => void },
};
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.
// https://github.com/facebook/flow/issues/2221
// $FlowFixMe
@ -49,7 +60,7 @@ function TransactionList(props: Props) {
{/* @if TARGET='app' */}
{!slim && (
<FileExporter
data={transactions}
data={allTransactions}
label={__('Export')}
title={__('Export Transactions')}
filters={['nout']}