filter out fills if open orders account doesnt exist for mkt

This commit is contained in:
Tyler Shipe 2021-08-09 10:55:48 -04:00
parent 3dadee255a
commit 5154292e7d
1 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,9 @@ export const useTradeHistory = () => {
const mangoAccountFills = fills
.filter((fill) => {
if (fill.openOrders) {
return fill.openOrders.equals(openOrdersAccount?.publicKey)
return openOrdersAccount?.publicKey
? fill.openOrders.equals(openOrdersAccount?.publicKey)
: false
} else {
return (
fill.taker.equals(mangoAccount.publicKey) ||