-
-
Save ajb413/093480ff584d6ed415a0a729286e68f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const comet = useMemo(() => new Contract(networkConfig.rootsV3.comet, Comet, signer), [signer]); | |
useAsyncEffect(async () => { | |
const decimals = +(await comet.callStatic.decimals()).toString(); | |
const borrowBalance = +(await comet.callStatic.borrowBalanceOf(account)).toString(); | |
setBorrowBalance(borrowBalance / Math.pow(10, decimals)); | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment