Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: just merge vault pnl points for smooth recent pnl plus long term views #1134

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

tyleroooo
Copy link
Contributor

@tyleroooo tyleroooo commented Oct 14, 2024

Going to hold off merging until staging pnl points are fixed so I can see how this actually looks.

@tyleroooo tyleroooo requested a review from a team as a code owner October 14, 2024 20:04
Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v4-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 8:06pm
v4-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 8:06pm

@tyleroooo
Copy link
Contributor Author

seems fine

@tyleroooo tyleroooo enabled auto-merge (squash) October 16, 2024 00:17
src/hooks/vaultsHooks.ts Show resolved Hide resolved
src/hooks/vaultsHooks.ts Show resolved Hide resolved
@tyleroooo tyleroooo merged commit 660dbe8 into main Oct 16, 2024
10 checks passed
@tyleroooo tyleroooo deleted the tu/combine-points branch October 16, 2024 16:20
const getMegavaultHistoricalPnl = useCallback(
async (resolution: PnlTickInterval = PnlTickInterval.day) => {
try {
return await indexerClient.vault.getMegavaultHistoricalPnl(resolution);
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just wrap this with VaultCalculator.getVaultHistoricalPnlResponse(safeStringifyForAbacusParsing(res)); here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, but the vibe in useDydxClient is generally it's only wrapping client calls and returning untyped garbage so I followed that convention. Not sure why it's that way though.

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.

2 participants