Skip to content

feat(xbull): check extension version before connect/getAddress, reject outdated with ExtensionVersionTooOldError (#771) - #827

Open
ZacLou wants to merge 4 commits into
Stellar-split:mainfrom
ZacLou:feat/xbull-version-check-771
Open

feat(xbull): check extension version before connect/getAddress, reject outdated with ExtensionVersionTooOldError (#771)#827
ZacLou wants to merge 4 commits into
Stellar-split:mainfrom
ZacLou:feat/xbull-version-check-771

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 5, 2026

Copy link
Copy Markdown

Closes #771.

XBullAdapter now reads window.xbull.version before attempting connect() or getAddress() and rejects outdated extensions with a typed ExtensionVersionTooOldError.

Changes:

  • Export MIN_XBULL_VERSION (default "3.0.0") as the minimum required version.
  • Add ExtensionVersionTooOldError to the typed error hierarchy.
  • connect() and getAddress() call checkVersion() before proceeding.
  • Missing version field is treated as "unknown" and rejected (pre-dates the current API surface).
  • Semantic version comparison ensures proper ordering.
  • Add unit tests covering missing version, too-old, exact, and newer paths.

ZacLou added 4 commits September 6, 2026 03:48
…ellar-split#772)

- Add FreighterNotInstalledError with install URL in message
- Check window.freighter presence before connect, sign, and getAddress
- Throw FreighterNotInstalledError instead of raw TypeError
- Existing logic unchanged when extension is present
- Add unit tests for missing extension, error message, and normal flow

Closes Stellar-split#772
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.

Check XBull extension version before attempting connection

1 participant