Repository navigation
fix(ledger): open the Stellar app when it is not running - #3038
Open
SmolinPavel wants to merge 3 commits into
Open
SmolinPavel wants to merge 3 commits into
SmolinPavel wants to merge 3 commits into
Conversation
When the Ledger is on its dashboard, Freighter showed "Ledger device: UNKNOWN_ERROR (0x6511)". Now it asks the device to open the Stellar app (the user confirms on the device) and reconnects. If another app is open, it quits that app first. Locked, declined and not-open cases get readable messages instead of raw status codes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@JakeUrban could you please review this one? |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate issues remain in request timing, device targeting, dashboard detection, and decline handling.
3 open findings
What changed in this PR
Updates Ledger connection handling to open the Stellar app automatically and provide clearer error messages.
Changes:
- Adds Ledger app switching and reconnection logic.
- Adds English and Portuguese error translations.
- Expands tests for Ledger connection scenarios.
| File | Summary |
|---|---|
extension/src/popup/locales/pt/translation.json |
Adds Portuguese Ledger error messages. |
extension/src/popup/locales/en/translation.json |
Adds English Ledger error messages. |
extension/src/popup/helpers/hardwareConnect.ts |
Implements Ledger app detection, switching, reconnection, and error handling. |
extension/src/popup/helpers/__tests__/hardwareConnect.test.ts |
Tests new Ledger connection scenarios. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…boards After switching apps the device comes back as a new HIDDevice, and openConnected opens the first Ledger it finds. With two Ledgers attached that could be the wrong one, so reconnect only when exactly one is attached. Also treat "OLOS\0", which older firmware reports for the dashboard, the same as "BOLOS". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@JakeUrban addressed Copilot's comments in 23497f2, CI is green. Ready for a look when you have time. |
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.


What
When the Ledger is on its dashboard, Freighter now asks the device to open the Stellar app (the user confirms on the device) and reconnects. If another app is open (e.g. Ethereum), it quits that app first. Locked, declined and not-open cases show readable messages instead of raw status codes.
Why
Today a Ledger on its dashboard shows "Ledger device: UNKNOWN_ERROR (0x6511)", and with another app open it shows "Invalid data received (0x6a80)". Other wallets (e.g. MetaMask) open the app for the user.
Screenshots / video
Ledger device: UNKNOWN_ERROR (0x6511)Checklist
🤖 Generated with Claude Code