otterscan/src/components/GasValue.tsx

14 lines
338 B
TypeScript
Raw Normal View History

2021-07-01 18:21:40 +00:00
import React from "react";
import { BigNumber } from "@ethersproject/bignumber";
import { commify, formatUnits } from "@ethersproject/units";
2021-07-01 18:21:40 +00:00
type GasValueProps = {
value: BigNumber;
};
const GasValue: React.FC<GasValueProps> = ({ value }) => {
return <>{commify(formatUnits(value, 0))}</>;
2021-07-01 18:21:40 +00:00
};
export default React.memo(GasValue);