otterscan/src/components/GasValue.tsx
2021-08-08 19:49:45 -03:00

14 lines
338 B
TypeScript

import React from "react";
import { BigNumber } from "@ethersproject/bignumber";
import { commify, formatUnits } from "@ethersproject/units";
type GasValueProps = {
value: BigNumber;
};
const GasValue: React.FC<GasValueProps> = ({ value }) => {
return <>{commify(formatUnits(value, 0))}</>;
};
export default React.memo(GasValue);