fix balances table when not connected
This commit is contained in:
parent
7f0ec51d97
commit
e3756ac2a7
|
@ -47,7 +47,7 @@ const BalancesTable = () => {
|
|||
const { initContributions } = useHealthContributions()
|
||||
|
||||
const filteredBanks = useMemo(() => {
|
||||
if (banks.length) {
|
||||
if (banks.length && mangoAccountAddress) {
|
||||
return banks.filter((b) => {
|
||||
return (
|
||||
Math.abs(floorToDecimal(b.balance, b.bank.mintDecimals).toNumber()) >
|
||||
|
@ -58,7 +58,7 @@ const BalancesTable = () => {
|
|||
})
|
||||
}
|
||||
return []
|
||||
}, [banks])
|
||||
}, [banks, mangoAccountAddress])
|
||||
|
||||
const formattedTableData = useCallback(() => {
|
||||
const formatted = []
|
||||
|
@ -100,6 +100,8 @@ const BalancesTable = () => {
|
|||
sortConfig,
|
||||
} = useSortableData(formattedTableData())
|
||||
|
||||
console.log(tableData)
|
||||
|
||||
return filteredBanks.length ? (
|
||||
showTableView ? (
|
||||
<Table>
|
||||
|
|
Loading…
Reference in New Issue