Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tyleroooo
Copy link
Contributor

Should be much faster now

@tyleroooo tyleroooo requested a review from a team as a code owner October 9, 2025 20:27
@vercel
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
v4-staging Ready Ready Preview Comment Oct 9, 2025 11:23pm
v4-testnet Ready Ready Preview Comment Oct 9, 2025 11:23pm

Comment on lines +110 to +111
const [daily, hourly] = await Promise.all([dailyResults, hourlyResults]);
return orderBy([...daily, ...hourly], [(p) => p.createdAtMilliseconds], ['asc']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq: how come we combine daily + hourly responses into a single array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's basically the same thing we do for megavault pnl - it means the most recent end of the line is high resolution and the further from now you go you get lower res. I know it doesn't look perfect but I find it is an elegant solution and looks okay.

Comment on lines +110 to +111
const [daily, hourly] = await Promise.all([dailyResults, hourlyResults]);
return orderBy([...daily, ...hourly], [(p) => p.createdAtMilliseconds], ['asc']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's basically the same thing we do for megavault pnl - it means the most recent end of the line is high resolution and the further from now you go you get lower res. I know it doesn't look perfect but I find it is an elegant solution and looks okay.

}, 'parentSubaccountHistoricalPnls'),
const [daily, hourly] = await Promise.all([dailyResults, hourlyResults]);
return orderBy([...daily, ...hourly], [(p) => p.createdAtMilliseconds], ['asc']);
}, 'parentSubaccountHistoricalPnlsV2'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log id is here

@tyleroooo
Copy link
Contributor Author

gonna hold off on deploying while david makes sure this endpoint isn't totally broken

@tyleroooo tyleroooo merged commit c17c77e into main Oct 10, 2025
10 checks passed
@tyleroooo tyleroooo deleted the tu/new-pnl branch October 10, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants