You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
669 B
24 lines
669 B
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import CurrencyDisplay from '../currency-display'
|
|
import { useTokenDisplayValue } from '../../../hooks/useTokenDisplayValue'
|
|
|
|
export default function TokenCurrencyDisplay ({ className, transactionData, token, prefix }) {
|
|
const displayValue = useTokenDisplayValue(transactionData, token)
|
|
|
|
return (
|
|
<CurrencyDisplay
|
|
className={className}
|
|
prefix={prefix}
|
|
displayValue={displayValue}
|
|
suffix={token.symbol}
|
|
/>
|
|
)
|
|
}
|
|
|
|
TokenCurrencyDisplay.propTypes = {
|
|
className: PropTypes.string,
|
|
transactionData: PropTypes.string,
|
|
token: PropTypes.object,
|
|
prefix: PropTypes.string,
|
|
}
|
|
|