fix(intents): unify supported-chains source of truth (#128) - #335
Open
GoodnessJohn wants to merge 1 commit into
Open
fix(intents): unify supported-chains source of truth (#128)#335GoodnessJohn wants to merge 1 commit into
GoodnessJohn wants to merge 1 commit into
Conversation
…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
|
@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! 🚀 |
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
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