Repository navigation
fix(ledger): open the Stellar app when it is not running - #3038
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>
|
@JakeUrban could you please review this one? |
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>
|
@JakeUrban addressed Copilot's comments in 23497f2, CI is green. Ready for a look when you have time. |
…ed-error # Conflicts: # extension/src/popup/locales/en/translation.json # extension/src/popup/locales/pt/translation.json
|
@JakeUrban @piyalbasu - can we merge this one? |
--z-index--ledger tied with --z-index-modal at 30, so stacking between the HardwareSign overlay and a modal depended on DOM order. 31 puts the Ledger overlay above modals; its inner layer (var + 1) becomes 32. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Hey @SmolinPavel Sorry for the delay here! We had some other work that needed to get merged. Just reviewed this with my Ledger and this is looking good to me! I noticed there was a CSS issue with the Ledger modal while testing, so I pushed one commit to your PR to fix that. |


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