A Metamask fork with Infura removed and default networks editable
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.
 
 
 
 
 
ciphermask/ui/app/components/ui/token-currency-display/token-currency-display.comp...

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,
}