Skip to content

fix: name hardcoded chain IDs#878

Merged
realfishsam merged 8 commits into
mainfrom
fix/issue-251-chain-id-constants
Jun 8, 2026
Merged

fix: name hardcoded chain IDs#878
realfishsam merged 8 commits into
mainfrom
fix/issue-251-chain-id-constants

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Introduce named chain ID constants for Limitless, Polymarket, and Probable.
  • Replace inline chain ID literals in the affected auth/client/runtime code paths.

Tests

  • Not run; this is a literal-to-constant refactor with no behavioral change.

Fixes #251

@realfishsam

realfishsam commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

PR Review: PASS (NOT VERIFIED)

What This Does

Replaces hard-coded EVM chain-id literals with named constants across exchange setup. Runtime response shapes are unchanged; the win is safer configuration/readability.

Blast Radius

Limitless, Polymarket, and Probable auth/client/websocket setup; no SDK model or OpenAPI shape change.
Changed files reviewed: core/src/exchanges/limitless/client.ts, core/src/exchanges/limitless/config.ts, core/src/exchanges/limitless/index.ts, core/src/exchanges/polymarket/auth.ts, core/src/exchanges/polymarket/config.ts, core/src/exchanges/polymarket/index.ts, core/src/exchanges/probable/auth.ts, core/src/exchanges/probable/config.ts, core/src/exchanges/probable/websocket.ts

Consumer Verification

Before (base branch):
Base branch (origin/main) does not include these changes. I reviewed the diff against the base and did not run full live-exchange before/after reproduction in this daily batch.

After (PR branch):
PR branch build PASS; authenticated local sidecar smoke PASS using POST /api/mock/fetchMarkets with x-pmxt-access-token, response snippet: {"success":true,"data":[{"marketId":"mock-m0","eventId":"mock-event-0","title":"Which party wins the 2026 harborland election?","description":"incididunt magna metus ut cupidatat aliquip dolore quis incididunt id do aenean aenean non dolor dolore tempor pharetra lorem fugiat aenean est voluptate ...

Test Results

  • Build: PASS (npm run build --workspace=pmxt-core)
  • Unit tests: PASS (npm test --workspace=pmxt-core -- --runInBand)
  • Server starts: PASS
  • E2E smoke: PASS (POST /api/mock/fetchMarkets; live venue-specific calls were not made)
  • Dependency install: skipped (existing workspace deps reused)

Findings

No blocking findings.

PMXT Pipeline Check

  • Field propagation (3-layer): N/A
  • OpenAPI sync: N/A
  • Financial precision: N/A
  • Type safety: OK
  • Auth safety: OK

Semver Impact

patch -- bug fix/internal compatibility change unless SDK consumers rely on newly added APIs

Risk

The branch was built, core-tested, and authenticated-smoke-tested through the sidecar. Full live-exchange before/after behavior remains unverified for this daily batch; credentialed venue calls and venue API drift should be treated as residual risk unless covered by tests in this PR.

@realfishsam realfishsam merged commit 161fef0 into main Jun 8, 2026
12 checks passed
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.

Magic numbers: Hardcoded blockchain chain IDs

1 participant