Skip to content

Commit

Permalink
fix loading of mango wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 committed Aug 24, 2024
1 parent 9e7ce45 commit 6184fd7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions hooks/useTreasuryInfo/assembleWallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,14 @@ export async function fetchMangoAccounts(
}

const mangoAccountsValue = mangoAccounts.reduce((acc: I80F48, account) => {
const value = account.getAssetsValue(mangoGroup!)
acc = acc.add(value)
return acc
try {
const value = account.getAssetsValue(mangoGroup!)
acc = acc.add(value)
return acc
} catch (e) {
console.log(e)
return acc
}
}, new I80F48(new BN(0)))

return {
Expand Down

0 comments on commit 6184fd7

Please sign in to comment.