feat: replace dummy candle fallback with Pyth Benchmarks (#141) and add TxStatus component (#142)#170
Merged
AbelOsaretin merged 1 commit intoMay 31, 2026
Conversation
…atus component Closes SO4-Markets#141, closes SO4-Markets#142 - Replace generateDummyBars() in oracle.ts with fetchPythBenchmarkCandles(), which fetches real OHLC history from the Pyth Benchmarks TradingView shim (https://benchmarks.pyth.network). Fallback chain is now: Binance → GMX oracle → Pyth Benchmarks → empty array. The dummy random bars are removed entirely. - Create apps/web/src/shared/components/TxStatus.tsx, a shared component that renders the transaction lifecycle: pending (spinner), success (checkmark + hash + Stellar Expert link), and failed (error icon + parseSorobanError message). Works both inside toast.custom and as an inline component. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@MarvyNwaokobia 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! 🚀 |
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
Resolves two issues from the Phase 9 — Shared UX & Polish milestone:
TxStatusshared component #142#141 — Replace dummy candle fallback with Pyth historical data
generateDummyBars()in oracle.ts has been removed and replaced withfetchPythBenchmarkCandles(), which fetches real historical OHLC data from the Pyth Benchmarks TradingView shim API.Fallback chain is now:
[]if all three failThe function maps each supported symbol to its
Crypto.{SYM}/USDPyth feed name and converts the period string to the corresponding Benchmarks resolution (1,5,15,60,240,1D). Thefrom/towindow is computed fromlimit × intervalSecondsso the number of bars matches the original request.#142 — Create
TxStatusshared componentNew file:
apps/web/src/shared/components/TxStatus.tsxA self-contained React component that renders all three transaction lifecycle states via a discriminated union prop (
TxStatusState):pendingsuccessexplorerTxUrl)failedparseSorobanErrorWorks inside
toast.custom(t => <TxStatus state={...} />)as well as inline anywhere in the component tree.Test plan
TxStatuspending state renders spinner and copyTxStatussuccess state shows hash, correct Stellar Expert URL, and correct network (testnet/mainnet)TxStatusfailed state renders a human-readable error viaparseSorobanErrortoast.customSonner toast🤖 Generated with Claude Code