import { ethers , BigNumber } from "ethers" ; export const getInteger = ( num , unit = "ether" ) => { const str = ethers . utils . formatUnits ( num , unit ) ; return Math . floor ( Number ( str ) ) ; } ;