Skip to content

Instantly share code, notes, and snippets.


ajb413/App.tsx Secret

Created December 12, 2022 17:33
What would you like to do?
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