From 90e166ddcc4ad43bc123ad5749101e14e0b285a8 Mon Sep 17 00:00:00 2001 From: tjs Date: Wed, 6 Jul 2022 09:46:16 -0400 Subject: [PATCH] fix type errors --- components/AccountActions.tsx | 5 +++-- pages/testing.tsx | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/AccountActions.tsx b/components/AccountActions.tsx index 6b33291a..fe63349e 100644 --- a/components/AccountActions.tsx +++ b/components/AccountActions.tsx @@ -17,9 +17,10 @@ const AccountActions = () => { const handleCloseMangoAccount = async () => { const client = mangoStore.getState().client const mangoAccount = mangoStore.getState().mangoAccount - if (!mangoAccount) return + const group = mangoStore.getState().group + if (!mangoAccount || !group) return try { - const tx = await client.closeMangoAccount(mangoAccount) + const tx = await client.closeMangoAccount(group, mangoAccount) console.log('success:', tx) } catch (e) { console.log(e) diff --git a/pages/testing.tsx b/pages/testing.tsx index 5f94be40..50cd2059 100644 --- a/pages/testing.tsx +++ b/pages/testing.tsx @@ -64,11 +64,11 @@ const Index: NextPage = () => {
Indexed Total Deposits:{' '} - {bank.value.indexedTotalDeposits.toString()} + {bank.value.cachedIndexedTotalDeposits.toString()}
Indexed Total Borrows:{' '} - {bank.value.indexedTotalDeposits.toString()} + {bank.value.cachedIndexedTotalBorrows.toString()}
Mint Decimals: {bank.value.mintDecimals.toString()}
Deposit Index: {bank.value.depositIndex.toString()}