import React from 'react'
import PropTypes from 'prop-types'
import { btc } from 'lib/utils'
import Isvg from 'react-inlinesvg'
import Value from 'components/Value'
import checkmarkIcon from 'icons/check_circle.svg'
import { FormattedTime, FormattedMessage, injectIntl } from 'react-intl'
import messages from './messages'
import styles from '../Activity.scss'
const Invoice = ({ invoice, ticker, currentTicker, showActivityModal, currencyName, intl }) => (
showActivityModal('INVOICE', invoice.payment_request)}
>
{invoice.settled ? (
) : (
)}
+
{currencyName}
{currentTicker[ticker.fiatTicker].symbol}
{btc.convert('sats', 'fiat', invoice.value, currentTicker[ticker.fiatTicker].last)}
)
Invoice.propTypes = {
invoice: PropTypes.object.isRequired,
ticker: PropTypes.object.isRequired,
currentTicker: PropTypes.object.isRequired,
showActivityModal: PropTypes.func.isRequired,
currencyName: PropTypes.string.isRequired
}
export default injectIntl(Invoice)