Skip to content

Commit

Permalink
Fix vaults PnL endpoint. (backport #2612) (#2613)
Browse files Browse the repository at this point in the history
Co-authored-by: vincentwschau <[email protected]>
  • Loading branch information
mergify[bot] and vincentwschau authored Nov 25, 2024
1 parent 46df29b commit 963f22c
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 963f22c

Please sign in to comment.