import React from "react"; import TransactionListItem from "./internal/TransactionListItem"; import FormField from "component/formField"; import lbryuri from "lbryuri"; import * as modals from "constants/modal_types"; class TransactionList extends React.PureComponent { constructor(props) { super(props); this.state = { filter: null, }; } handleFilterChanged(event) { this.setState({ filter: event.target.value, }); } filterTransaction(transaction) { const { filter } = this.state; return !filter || filter == transaction.type; } isRevokeable(txid, nout) { // a claim/support/update is revokable if it // is in my claim list(claim_list_mine) return this.props.myClaims.has(`${txid}:${nout}`); } revokeClaim(abandonData) { const { name: name, claimId: claimId, txid: txid, nout: nout, } = abandonData; const uri = lbryuri.build({ name, claimId }); this.props.resolveUri(uri); this.props.openModal(modals.CONFIRM_CLAIM_REVOKE, { claimId, txid, nout }); } render() { const { emptyMessage, rewards, transactions } = this.props; let transactionList = transactions.filter( this.filterTransaction.bind(this) ); return (
{__("Date")} | {__("Amount (Fee)")} | {__("Type")} | {__("Details")} | {__("Transaction")} | {__("Action")} |
---|