Skip to content

[Markets] Build oracle price display for market detail - #1438

Open
samuel2926i39-art wants to merge 1 commit into
solutions-plug:mainfrom
samuel2926i39-art:feat/1362-oracle-price-widget
Open

[Markets] Build oracle price display for market detail#1438
samuel2926i39-art wants to merge 1 commit into
solutions-plug:mainfrom
samuel2926i39-art:feat/1362-oracle-price-widget

Conversation

@samuel2926i39-art

Copy link
Copy Markdown

Summary

Adds OraclePriceWidget for the market detail view, showing the current Pyth-backed reference price and its as-of timestamp, with a visible staleness badge when the feed exceeds a configurable freshness threshold.

Context

  • Backed by contracts/predict-iq/src/pyth_client.rs via GET /api/v1/blockchain/oracle/:market_id.
  • Before: no oracle price was surfaced on market detail; a stopped feed had no way to be distinguished from a live one.
  • After: price + as-of time render together, and a price older than the threshold (default 60s, configurable via prop) shows a Stale badge instead of being presented as current.

Testing

  • Manually verified fresh vs. stale states by adjusting freshnessThresholdSeconds against a mocked timestamp.
  • Verified error/loading states render distinct, non-misleading UI (no stale price silently shown as fresh).
  • No existing test suite wiring for this endpoint yet; component is structured for straightforward unit testing with a mocked fetch.

Closes #1362

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@samuel2926i39-art 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

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.

[Markets] Build oracle price display for market detail

1 participant