Skip to content

Commit

Permalink
Fix vaults PnL endpoint. (#2612)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6aee32b)
  • Loading branch information
vincentwschau authored and mergify[bot] committed Nov 25, 2024
1 parent 46df29b commit 9d6e74e
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 9d6e74e

Please sign in to comment.