check for unsettled and inorders in balances

This commit is contained in:
tjs 2023-01-02 15:43:31 -05:00
parent 106fab4af7
commit 1ff61d3318
1 changed files with 7 additions and 4 deletions

View File

@ -46,12 +46,15 @@ const BalancesTable = () => {
Math.abs(b.balance! * b.value[0].uiPrice) -
Math.abs(a.balance! * a.value[0].uiPrice)
)
.filter(
(c) =>
.filter((c) => {
return (
Math.abs(
floorToDecimal(c.balance!, c.value[0].mintDecimals).toNumber()
) > 0
)
) > 0 ||
spotBalances[c.value[0].mint.toString()]?.unsettled > 0 ||
spotBalances[c.value[0].mint.toString()]?.inOrders > 0
)
})
: rawBanks
return sortedBanks