chore: remove unused liquidations code and storage migration#339
chore: remove unused liquidations code and storage migration#339antoncoding merged 2 commits intomasterfrom
Conversation
Removed: - useMonarchLiquidationsQuery (unused hook) - useLiquidationsQuery (deprecated fallback) - morpho-api/liquidations.ts (unused data source) - subgraph/liquidations.ts (unused data source) - app/api/monarch/liquidations route (unused API proxy) - StorageMigrator component (migration complete) - storage-migration.ts utility Updated: - app/layout.tsx: removed StorageMigrator - useMarketMetricsQuery: cleaned up comments
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughDeletes liquidation-related data pipeline and storage migration code: removes a Next.js API route, multiple liquidations data-source modules and hooks, the StorageMigrator component, and the storage-migration utilities; documentation and a few query polling intervals updated. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- useMarketMetricsQuery: refetchInterval 1min → 5min (match staleTime) - useMarketData: restore 30s staleTime for accuracy on market views - docs: update TECHNICAL_OVERVIEW with correct hooks and timings - Add useMarketMetricsQuery (5 min stale) - Fix useLiquidationsQuery → useMarketLiquidations - Correct stale times to match code
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/hooks/queries/useMarketMetricsQuery.ts (1)
128-130: Docstring says 15 minutes, code says 5 minutes.The JSDoc claims "cached for 15 minutes" but
staleTimeis actually 5 minutes. Consider updating the comment to match.Proposed fix
/** * Fetches enhanced market metrics from the Monarch monitoring API. - * Pre-fetched and cached for 15 minutes. + * Pre-fetched and cached for 5 minutes.
Summary
Cleanup of unused code after migrating to Monarch API's
everLiquidatedfield.Removed Files (-1,049 lines)
Liquidations (no longer needed - using
everLiquidatedfrom market metrics)src/hooks/queries/useMonarchLiquidationsQuery.ts— unused hooksrc/hooks/queries/useLiquidationsQuery.ts— deprecated fallbacksrc/data-sources/morpho-api/liquidations.ts— unused data sourcesrc/data-sources/subgraph/liquidations.ts— unused data sourceapp/api/monarch/liquidations/route.ts— unused API proxyStorage Migration (migration period complete)
src/components/StorageMigrator.tsx— one-time migration componentsrc/utils/storage-migration.ts— migration utilityUpdated Files
app/layout.tsx— removed StorageMigrator componentsrc/hooks/queries/useMarketMetricsQuery.ts— cleaned up deprecated commentsVerification
Summary by CodeRabbit
Refactor
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.