Match fills against all owned OpenOrder accounts

This commit is contained in:
Nishad 2020-09-06 13:57:19 +08:00
parent e6048dfd36
commit 3a6e2a467c
1 changed files with 5 additions and 2 deletions

View File

@ -488,9 +488,12 @@ export function useFills(limit = 100) {
if (!fills) {
return null;
}
const openOrdersAccount = openOrdersAccounts[0];
return fills
.filter((fill) => fill.openOrders.equals(openOrdersAccount.publicKey))
.filter((fill) =>
openOrdersAccounts.some((openOrdersAccount) =>
fill.openOrders.equals(openOrdersAccount.publicKey),
),
)
.map((fill) => ({ ...fill, marketName }));
}