Skip to content

fix(intents): unify supported-chains source of truth (#128) - #335

Open
GoodnessJohn wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
GoodnessJohn:fix/issues-128-129-130-131
Open

fix(intents): unify supported-chains source of truth (#128)#335
GoodnessJohn wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
GoodnessJohn:fix/issues-128-129-130-131

Conversation

@GoodnessJohn

Copy link
Copy Markdown

Summary
Four independent issues resolved in one pass. No behaviour changes — purely a refactor, docs addition, and CI hardening.

#128 — Unify SUPPORTED_CHAINS source of truth
Problem: SupportedChain type in intents.types.ts, the hardcoded array in CreateIntentDto, and the keys in tokens.data.ts were three separate lists that could silently drift.

Fix:

intents.types.ts now exports SUPPORTED_CHAINS as a typed as const tuple; SupportedChain is derived from it via (typeof SUPPORTED_CHAINS)[number].
CreateIntentDto removes its local array and imports SUPPORTED_CHAINS directly from intents.types.ts.
New
supported-chains-sync.spec.ts
guards the invariant: every EVM chain in SUPPORTED_CHAINS must have token entries in tokens.data.ts, and tokens.data.ts must not carry any chain not listed in SUPPORTED_CHAINS.
Closes #128

#129 — Document live vs planned chain integrations
Fix: Added a Supported chains matrix to README.md (placed before the Roadmap section) with a live/planned breakdown. Stellar is the only live integration; the six EVM chains have token data in place but no on-chain settlement yet. Includes a contributor note pointing to the settlement design doc.

Closes #129

#130 — Add npm dependency caching to CI
Fix: Added cache: npm to the actions/setup-node@v4 step in both the backend matrix job and the vulnerability-scan job. Also normalised npm install → npm ci throughout for reproducible installs.

Bonus: the backend job's steps were previously malformed (duplicate stray lines from a partial edit) — the file has been cleaned up to a correct YAML structure.

Closes #130

#131 — Add Docker image build verification to CI
Fix: Added a new docker job that runs docker/build-push-action@v6 with push: false after the backend job passes. This fails CI on any commit that breaks the Dockerfile without requiring registry credentials. Image publishing can be wired up as a follow-up.

Closes #131

…protocol#128)

Export SUPPORTED_CHAINS as a const tuple from intents.types.ts and
derive SupportedChain from it. Remove the duplicate local array in
CreateIntentDto and import the canonical constant instead.

Add supported-chains-sync.spec.ts to guard that every EVM chain in
SUPPORTED_CHAINS has token entries in tokens.data.ts and that tokens.data.ts
carries no chains not listed in SUPPORTED_CHAINS.

Closes stellar-vortex-protocol#128
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@GoodnessJohn 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

1 participant