import React from "react"; import { BigNumber } from "ethers"; import { formatValue } from "./formatter"; type TransactionValueProps = { value: BigNumber; decimals?: number; hideUnit?: boolean; }; const TransactionValue: React.FC = ({ value, decimals = 18, hideUnit, }) => { const formattedValue = formatValue(value, decimals); return ( {formattedValue} {!hideUnit && " Ether"} ); }; export default React.memo(TransactionValue);