Skip to content

feat(ledger): check app version before signing, reject outdated firmware (#775) - #825

Open
ZacLou wants to merge 2 commits into
Stellar-split:mainfrom
ZacLou:feat/ledger-firmware-check-775
Open

feat(ledger): check app version before signing, reject outdated firmware (#775)#825
ZacLou wants to merge 2 commits into
Stellar-split:mainfrom
ZacLou:feat/ledger-firmware-check-775

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 5, 2026

Copy link
Copy Markdown

Closes #775.

LedgerAdapter now queries the Ledger Stellar app version via getAppConfiguration() before signing and rejects outdated versions with a typed LedgerFirmwareTooOldError.

Changes:

  • Export MIN_LEDGER_FIRMWARE (default "2.0.0") as the minimum required version.
  • Add LedgerFirmwareTooOldError to the typed error hierarchy.
  • LedgerAdapter constructor accepts skipFirmwareCheck (defaults to false) so tests can bypass the check.
  • Semantic version comparison ensures "2.0.0" < "2.0.1" < "3.0.0" etc.
  • Add unit tests covering too-old, exact, newer, and skipped-check paths.

ZacLou added 2 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 Ledger firmware version before attempting to sign

1 participant