Skip to content

Commit

Permalink
Fix vaults PnL endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentwschau committed Nov 25, 2024
1 parent 744a58b commit a27a69b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ class VaultController extends Controller {
]);

const groupedVaultPnlTicks: VaultHistoricalPnl[] = _(vaultPnlTicks)
.filter((pnlTickFromDatabsae: PnlTicksFromDatabase): boolean => {
return vaultSubaccounts[pnlTickFromDatabsae.subaccountId] !== undefined;
})
.groupBy('subaccountId')
.mapValues((pnlTicks: PnlTicksFromDatabase[], subaccountId: string): VaultHistoricalPnl => {
const market: PerpetualMarketFromDatabase | undefined = perpetualMarketRefresher
Expand Down

0 comments on commit a27a69b

Please sign in to comment.