filter out fills if open orders account doesnt exist for mkt
This commit is contained in:
parent
3dadee255a
commit
5154292e7d
|
@ -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) ||
|
||||
|
|
Loading…
Reference in New Issue