Skip to content

fix(trade): label GMX fallback candles as "GMX Oracle Reference" - #978

Open
Mohit0628 wants to merge 2 commits into
SO4-Markets:mainfrom
Mohit0628:fix/830-gmx-oracle-label
Open

Mohit0628 wants to merge 2 commits into
SO4-Markets:mainfrom
Mohit0628:fix/830-gmx-oracle-label

Conversation

@Mohit0628

@Mohit0628 Mohit0628 commented Oct 15, 2026 •

Copy link
Copy Markdown

What changed and why

fetchOracleCandles in apps/web/src/features/trade/lib/oracle.ts falls back to the GMX API (ENV.ORACLE_URL) but labelled the resulting series "SO4 Oracle Reference". Now that the third-party SO4 oracle worker has been removed, that label misattributes third-party GMX (Arbitrum) prices to SO4. This renames all three GMX-path return sites to "GMX Oracle Reference":

  • the aborted-signal early return,
  • the successful return's venueName,
  • the catch fallback.

No logic, types, or pricing maths changed — it is a display-label correction. The source: "gmx" value was already correct.

A changelog entry is included at .changelog/unreleased/978-gmx-oracle-label.md (type: fixed, area: trade).

Verification

Full gate run locally (Windows), from the repo root:

  • bun install --frozen-lockfile
  • bun run check:tokens
  • bun run check:content
  • bun run test
  • bun run test:coverage
  • bun run build
  • bun lint — fails on 9 pre-existing errors (see comment below)
  • bun typecheck — fails on 2 pre-existing errors (see comment below)

The two failing checks fail only on errors in files this PR does not modify; the full list is in the comment below. Everything else is green.

Linked issue

Closes #830

fetchOracleCandles falls back to the GMX API (ENV.ORACLE_URL) but
labelled the series "SO4 Oracle Reference". With the third-party SO4
oracle worker removed, that label misattributes third-party GMX
(Arbitrum) prices to SO4. Rename all three GMX-path return sites
(aborted early-return, success return, catch fallback) to
"GMX Oracle Reference".

Refs SO4-Markets#830
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

@Mohit0628 is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

Follow the changelog convention of using the pull request number in the
filename and frontmatter (was the issue number 830).
@Mohit0628

Copy link
Copy Markdown
Author

Quality gate run locally (Windows) — full results

Ran the entire gate from the repo root on fix/830-gmx-oracle-label:

  • ✅ bun install --frozen-lockfile
  • ✅ bun run check:tokens
  • ✅ bun run check:content
  • ✅ bun run test
  • ✅ bun run test:coverage
  • ✅ bun run build
  • ❌ bun lint — 9 errors
  • ❌ bun typecheck — 2 errors

The two failures are pre-existing and in files this PR does not touch. This change edits three string literals in apps/web/src/features/trade/lib/oracle.ts and adds one changelog entry — it cannot introduce these. Per AGENTS.md ("a red gate is never unrelated"), flagging them explicitly rather than fixing unrelated code inside this PR:

bun lint (9 errors)

  • apps/web/src/features/trade/components/chart/TVChartContainer.tsx:20 — import/order
  • apps/web/src/features/trade/components/orderbook/DepthLadder.tsx:5 — import/order
  • apps/web/src/features/trade/components/orderbook/DepthLadder.tsx:6 — import/order
  • apps/web/src/features/trade/components/orderbook/DepthLadder.tsx:221 — @typescript-eslint/no-unnecessary-condition
  • apps/web/src/features/trade/components/orderbook/DepthLadder.tsx:222 — @typescript-eslint/no-unnecessary-condition
  • apps/web/src/features/trade/components/trade-panel/ConfirmationDialog.tsx:1 — sort-imports
  • apps/web/src/features/trade/components/trade-panel/ConfirmationDialog.tsx:135 — @typescript-eslint/no-unnecessary-condition
  • apps/web/src/features/trade/components/trade-panel/ConfirmationDialog.tsx:136 — @typescript-eslint/no-unnecessary-condition
  • apps/web/src/features/trade/hooks/useSourceFreshness.test.ts:152 — @typescript-eslint/no-unnecessary-type-assertion

bun typecheck (2 errors)

  • apps/web/src/features/trade/components/orderbook/DepthLadder.tsx:165 — TS6133: 'midPrice' is declared but its value is never read
  • apps/web/src/features/trade/components/trade-panel/ConfirmationDialog.tsx:333 — TS2304: Cannot find name 'ENV'

Happy to open a separate PR for these if that's useful — keeping this one scoped to the label fix.

@Mohit0628
Mohit0628 marked this pull request as ready for review October 16, 2026 05:55
@Mohit0628

Copy link
Copy Markdown
Author

Disclosure: this contribution was made with the help of Sarvam.ai assistant, it helped the find the issue after which codes and tests were run full gate locally myself.

This branch has not been deployed

No deployments
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.

Candle chart labels GMX data as "SO4 Oracle Reference"

1 participant