Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webhid: avoid unecessary device selection prompt if device already connected #100

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

refi93
Copy link
Contributor

@refi93 refi93 commented Mar 11, 2025

Motivation: if connecting through webhid, browser keeps showing prompt to select device even though the device has already been paired. This PR fixes that behavior and reuses existing pairing, avoiding the redundant prompt.

Ledger js library works similarly:

https://github.com/LedgerHQ/ledger-live/blob/a77b0c1236302f4fb58b61cf7d0df5632cdc86e1/libs/ledgerjs/packages/hw-transport-webhid/src/TransportWebHID.ts#L110

https://github.com/LedgerHQ/ledger-live/blob/a77b0c1236302f4fb58b61cf7d0df5632cdc86e1/libs/ledgerjs/packages/hw-transport/src/Transport.ts#L295

@refi93 refi93 force-pushed the fix-webhid-connection branch from 50ac31f to 3adfd32 Compare March 11, 2025 11:43
Copy link
Contributor

@benma benma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks!

@benma benma merged commit de41411 into BitBoxSwiss:master Mar 11, 2025
3 checks passed
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.

2 participants