Skip to content

Commit

Permalink
Fix vaults PnL endpoint. (#2612)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentwschau authored Nov 25, 2024
1 parent 744a58b commit 6aee32b
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 6aee32b

Please sign in to comment.