Skip to content

feat: replace hardcoded homepage stats with live protocol data#26

Open
Abidoyesimze wants to merge 4 commits into
Parashield-Protocol:mainfrom
Abidoyesimze:feat/live-protocol-stats
Open

feat: replace hardcoded homepage stats with live protocol data#26
Abidoyesimze wants to merge 4 commits into
Parashield-Protocol:mainfrom
Abidoyesimze:feat/live-protocol-stats

Conversation

@Abidoyesimze

Copy link
Copy Markdown
Contributor

Summary

  • feat: replace hardcoded homepage stats with live API data #8 — Live homepage stats: Replace hardcoded "Tests passing" and "Live products" footer metrics with protocol data that reflects real state.
  • Total coverage issued and total payouts are fetched via new fetchProtocolStats() (/policies/stats + /claims/stats).
  • Active products is derived live from useProducts (status === 'Active').
  • Stats show a Skeleton placeholder while loading; on API failure the value displays instead of a broken zero.
  • Per transaction ($0.00001) remains static as the Stellar network fee.

Closes #8

Test plan

  • Load homepage and confirm skeleton placeholders appear briefly in the stats section
  • Verify total coverage and total payouts populate from the API
  • Verify active products count matches products with status === 'Active'
  • Simulate API failure and confirm stats show
  • Confirm $0.00001 per transaction still displays as a static value

Made with Cursor

Fetch total coverage and payouts from the API, derive active product count from useProducts, and show skeleton placeholders while loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for boisterous-sunshine-dd4c4c failed.

Name Link
🔨 Latest commit 96b7d16
🔍 Latest deploy log https://app.netlify.com/projects/boisterous-sunshine-dd4c4c/deploys/6a40610be6ee330008bcccff

@nonsobethel0-dev

Copy link
Copy Markdown
Contributor

Please fix ci and conflict

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Abidoyesimze 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! 🚀

Learn more about application limits

devsimze and others added 2 commits June 28, 2026 00:45
Re-integrate fetchProtocolStats and StatValue wiring after merging upstream main, preserving search/filter UI from the merged branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: replace hardcoded homepage stats with live API data

3 participants