otterscan/src/components/GasValue.tsx

13 lines
293 B
TypeScript
Raw Normal View History

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