Repository navigation
feat(chart): build TWAP price chart overlay on creator key trading pa… - #1095
Merged
Chucks1093 merged 1 commit intoOct 17, 2026
Merged
Conversation
…ge (accesslayerorg#931) - Support 1h and 24h window queries in useKeyTwap with 60s refetchInterval via React Query - Add TWAP overlay dashed line, 1h/24h toggle controls, and legend to BondingCurveChart - Update hover tooltip to display TWAP value and percentage deviation from spot - Support hiding and graceful fallback when TWAP data is unavailable - Integrate TWAP chart overlay and window state in CreatorDetailPage - Add unit and integration test suites covering overlay, toggle controls, and tooltip
|
@timiturn3r Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CreatorDetailPage), allowing users to compare spot price against time-weighted averages.useKeyTwaphook andqueryKeys.creators.twapto support fetching both1hand24hTWAP windows (TwapWindowtype) from backend API with automatic 60-second background polling via React Query (refetchInterval: 60_000).BondingCurveChartwith an emerald dashed overlay line (stroke="#10b981",strokeDasharray="6 4"), interactive1H/24Hwindow toggle buttons, and an overlay visibility toggle (Show/Hide).CustomTooltip) to display the active TWAP window price and percentage deviation from spot on hover (▼ -X.XX% vs spot/▲ +X.XX% vs spot).null, the overlay line and legend are hidden and an "Unavailable" indicator is shown without chart flicker or UI disruption.useKeyTwap,BondingCurveChartoverlay/controls/tooltips, andCreatorDetailPageintegration.Closes #931
Testing
pnpm lintpnpm buildpnpm test run src/hooks/__tests__/useKeyTwap.test.tsxpnpm test run src/components/common/__tests__/BondingCurveChart.twap.test.tsxpnpm test run src/components/common/__tests__/BondingCurveChart.test.tsxpnpm test run src/components/common/__tests__/BondingCurveChart.mobile.test.tsxpnpm test run src/pages/__tests__/CreatorDetailPage.twapOverlay.integration.test.tsxChecklist
Closes #931)