feat: add PlatformStats component with usePlatformStats hook and getCreditVelocity#55
Open
Yasir-TechGuy wants to merge 2 commits into
Open
feat: add PlatformStats component with usePlatformStats hook and getCreditVelocity#55Yasir-TechGuy wants to merge 2 commits into
Yasir-TechGuy wants to merge 2 commits into
Conversation
added 2 commits
June 24, 2026 21:14
…reditVelocity - Add getCreditVelocity method to SorobanService class - Add usePlatformStats hook with staleTime 60s, refetch every 2 minutes - Add PlatformStats component with TVL, Active Pools, Total Farmers, 24h Credit Velocity - Add Skeleton loading states for each stat card - Pre-render stats server-side in farm/page.tsx via getPreRenderedStats() - Add Vitest snapshot test for PlatformStats component - Fix invalid Stellar addresses in soroban.history.test.ts
Author
|
Hi @prodbycorne Please check it out. |
Author
|
Hi @prodbycorne , Please approve the workflow. |
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
Implements the PlatformStats section showing platform health metrics above the pool list on the farm page.
Changes
src/lib/soroban.ts— AddedgetCreditVelocity(windowHours: 24)as a method onSorobanServiceclasssrc/hooks/useSorobanQuery.ts— AddedusePlatformStatshook withstaleTime: 60000, refetch every 2 minutessrc/components/PlatformStats/PlatformStats.tsx— New component with four stat cards (TVL, Active Pools, Total Farmers, 24h Credit Velocity)src/app/farm/page.tsx— Integrated PlatformStats with server-side pre-renderingsrc/lib/soroban.history.test.ts— Fixed invalid Stellar addressesAcceptance Criteria Met
usePlatformStatshook withstaleTime: 60000, refetch every 2 minutes<PlatformStats>with four<Stat>cards using ChakraStatNumber/StatLabelformatCreditsshowing asset code ("42.3M XLM")toLocaleString()getCreditVelocity(windowHours: 24)method onSorobanServicefarm/page.tsxcloses #33