Skip to content

refactor(stellar-wallet-snap): convert enums to as const objects - #227

Open
ulissesferreira wants to merge 1 commit into
mainfrom
refactor/ban-enums-stellar
Open

refactor(stellar-wallet-snap): convert enums to as const objects#227
ulissesferreira wants to merge 1 commit into
mainfrom
refactor/ban-enums-stellar

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Convert locally-declared TypeScript enums in stellar-wallet-snap to as const objects with derived union types.

Refs: MetaMask/utils#280, MetaMask/eslint-config#417

Enums converted

  • Converted all 36 locally declared enums across 30 Stellar source files, including non-exported enums.
  • Updated type-only enum member references to use typeof while preserving runtime member access and values.
  • Updated the Stellar snap manifest shasum.

Validation

  • Stellar package tests: 81 suites passed, 1,277 tests passed
  • Snap networks utils build: passed
  • Stellar snap build: passed
  • ESLint on changed files: passed
  • Oxfmt formatting check: passed
  • TypeScript validation: passed with only the existing baseUrl deprecation warning
  • Actual enum declarations remaining under packages/stellar-wallet-snap/src: 0
  • git diff --check: clean

Notes

No global lint configuration or changes outside stellar-wallet-snap are included; those belong in the separate infrastructure change.

… objects

Convert all locally-declared enums to const objects with derived union
types, matching the Bitcoin/Solana/Tron enum migration pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ulissesferreira
ulissesferreira requested a review from a team as a code owner August 27, 2026 18:01
@ulissesferreira
ulissesferreira deployed to default-branch August 27, 2026 18:01 — with GitHub Actions Active
@ulissesferreira ulissesferreira changed the title refactor(stellar-wallet-snap): convert enums to \ objects refactor(stellar-wallet-snap): convert enums to as const objects Aug 27, 2026
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.

1 participant