// @flow import * as ICONS from 'constants/icons'; import React from 'react'; import ButtonTransaction from 'component/common/transaction-link'; import CreditAmount from 'component/common/credit-amount'; import DateTime from 'component/dateTime'; import Button from 'component/button'; import Spinner from 'component/spinner'; import { toCapitalCase } from 'util/string'; import { buildURI, parseURI, TXO_LIST as TXO, ABANDON_STATES } from 'lbry-redux'; type Props = { txo: Txo, revokeClaim: (Txo, (string) => void) => void, isRevokeable: boolean, reward: ?{ reward_title: string, }, }; type State = { abandonState: string, }; class TxoListItem extends React.PureComponent { constructor() { super(); this.state = { abandonState: ABANDON_STATES.READY }; (this: any).abandonClaim = this.abandonClaim.bind(this); (this: any).getLink = this.getLink.bind(this); } getLink(type: string, tip: boolean) { const { abandonState } = this.state; if (type === 'claim') { return null; } if (this.state.abandonState === ABANDON_STATES.PENDING) { return ; } if (tip && type === TXO.SUPPORT) { return (