import React from "react"; import LinkTransaction from "component/linkTransaction"; import { CreditAmount } from "component/common"; import DateTime from "component/dateTime"; import Link from "component/link"; import lbryuri from "lbryuri"; class TransactionListItem extends React.PureComponent { abandonClaim() { const { claim_id: claimId, claim_name: name, txid, type, nout, } = this.props.transaction; let msg; if (type == "tip") { msg = "This will reduce the committed credits to the URL"; } else { msg = "This will reclaim you lbc, back to your account"; } const abandonData = { name: name, claimId: claimId, txid: txid, nout: nout, msg: msg, }; this.props.revokeClaim(abandonData); } getLink(type) { if (type == "tip") { return ( ); } else { return ( ); } } render() { const { reward, transaction, isRevokeable } = this.props; const { amount, claim_id: claimId, claim_name: name, date, fee, txid, type, nout, } = transaction; const dateFormat = { month: "short", day: "numeric", year: "numeric", }; return ( {date ?
: {__("(Transaction pending)")} }
{fee != 0 && } {type}{" "} {isRevokeable && this.getLink(type)} {reward && {__("Reward: %s", reward.reward_title)} } {name && claimId && {name} } ); } } export default TransactionListItem;