feat: implement Stellar asset conversion and exchange rate ticker - #93
Conversation
…TROIDX556#64) - Add AssetRate type to domain models - Create stellar formatting utilities (formatStellarPrice, formatAssetAmount, convertToUsd, sortAssetRates) - Add mock rate data with XLM, USDC, yUSDF, and AQUA assets - Integrate React Query for fetching and caching rate feeds with 30s polling - Build AssetTicker component with responsive layout, Lucide icons, and 24h change indicators - Skeleton loading states prevent layout shift during data fetch
|
@Fayyo 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! 🚀 |
|
@Fayyo is attempting to deploy a commit to the Cjay's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
MergeKeeper review Scope: in scope for linked issue The pull request correctly implements the Stellar asset conversion and exchange rate ticker component matching all requirements. Reviewed commit: |
|
MergeKeeper merge status Status: blocked Reason: One or more required CI checks failed. Failing checks:
Next steps:
|
Closes #64
Summary
Implements a real-time asset conversion and exchange rate ticker component for the dashboard, displaying live conversion rates between XLM, USDC, yUSDF, and AQUA on Stellar.
Changes
New files
src/components/dashboard/AssetTicker.tsx— Responsive ticker component with skeleton loading, 24h change indicators, Lucide icons, and live badge. Polls every 30s via React Query.src/lib/stellar.ts— Stellar formatting utilities:formatStellarPrice(adaptive precision),formatAssetAmount,convertToUsd, andsortAssetRates(XLM-first ordering).src/services/mock/rates.ts— Mock rate data for XLM, USDC, yUSDF, and AQUA assets.Modified files
src/types/domain.ts— AddedAssetRateinterface.src/services/query-keys.ts— Addedratesquery key.src/services/resources.ts— AddedgetAssetRatesresource function.src/services/mock/index.ts— Re-exports mock rates.src/hooks/use-queries.ts— AddeduseAssetRateshook with 30s refetch interval.Acceptance Criteria
npm run typecheck— passes (no new errors; pre-existing errors intransactions/page.tsxare unrelated)npm run lint— passes (no new errors)Testing