import { ethers } from 'ethers';
(async () => {
//calling smart contract which contains bigNumber
let bigNumber = await stakeContract.totalBalanceGrowRich();
let number = ethers.utils.formatEther(bigNumber);
setStakeInfo(prev => {
return { ...prev, staked: Number(number).toLocaleString('en-US') };
});
//which return non big Number
let currentTime = await stakeContract.getCurrentTime();
setStakeInfo(prev => {
return { ...prev, currentTime: Number(currentTime) };
});
})()