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
|
const mangoAccountFills = fills
|
||||||
.filter((fill) => {
|
.filter((fill) => {
|
||||||
if (fill.openOrders) {
|
if (fill.openOrders) {
|
||||||
return fill.openOrders.equals(openOrdersAccount?.publicKey)
|
return openOrdersAccount?.publicKey
|
||||||
|
? fill.openOrders.equals(openOrdersAccount?.publicKey)
|
||||||
|
: false
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
fill.taker.equals(mangoAccount.publicKey) ||
|
fill.taker.equals(mangoAccount.publicKey) ||
|
||||||
|
|
Loading…
Reference in New Issue