Skip to content

Add hardware wallet timeout handling and reconnection backoff in adapter.ts #973

Closed

Description

@k-deejah

Description: Problem

  1. In src/lib/adapter.ts (LedgerAdapter), connecting via WebUSB hangs indefinitely if the physical device is locked or the Stellar app is closed, without triggering a timeout error.
  2. When extension connections fail, the adapter immediately retries without an exponential backoff delay, flooding the browser.
  3. Common hardware error codes (such as 0x6804 for app not open) are returned as raw hex without user guidance.

Solution

Add a 15-second timeout to all hardware wallet connection attempts. Implement exponential backoff for failed connection attempts, and translate Ledger hex error codes into plain actionable instructions.

Acceptance Criteria

  • Hardware connection attempts timeout after 15 seconds if unresponsive.
  • Reconnection attempts use exponential backoff delays.
  • Ledger error codes display plain English troubleshooting steps.
  • Tests added in src/lib/__tests__/adapter.test.ts.

Note for Contributors

If you're assigned to this issue, write a clear and detailed description for your pull request. Explain what was changed, why it was needed, how it was implemented, and include any relevant testing or screenshots where applicable.

Activity

  1. added
    bugSomething isn't working
    testsTest coverage, test setup, or test infrastructure
    uxUser-experience / flow
    walletWallet connection and identity
    on Oct 14, 2026
  2. area523ufo commented on Oct 15, 2026

    @area523ufo

    Hi! I've submitted a fix with unit tests for this issue in PR #979. Please let me know if any adjustments are needed!

  3. timmyp10111 commented on Oct 15, 2026

    @timmyp10111

    @timmyp10111 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi Maintainer, I can fix this. Please assign

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @timmyp10111 to this issue.

  4. Jenola344 commented on Oct 15, 2026

    @Jenola344
    Contributor

    @Jenola344 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi Maitainer, I would love to work on this

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Jenola344 to this issue.

  5. drips-wave commented on Oct 15, 2026

    @drips-wave

    Congratulations, @Jenola344! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @Jenola344: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. drips-wave commented on Oct 26, 2026

    @drips-wave

    This issue has been completed by @Jenola344 as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @Jenola344: You earned 150 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingtestsTest coverage, test setup, or test infrastructureuxUser-experience / flowwalletWallet connection and identity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions