-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix(22851): check if active device to prevent autoconnect for hw #25503
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [712d03e]
Page Load Metrics (132 ± 177 ms)
Bundle size diffs
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #25503 +/- ##
========================================
Coverage 69.64% 69.65%
========================================
Files 1345 1345
Lines 47789 47789
Branches 13179 13179
========================================
+ Hits 33282 33283 +1
+ Misses 14507 14506 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
There was an issue where the selected device was kept "unlocked" by keyring controller. Then, the following logic was always redirecting to the selected device "page" and was connecting again to the previously unlocked hardware device:
https://github.com/MetaMask/metamask-extension/blob/develop/ui/pages/create-account/connect-hardware/index.js#L135-L139
To fix this, I simply checked if a device was active or not. Tested on Ledger, Trezor and QR based wallets
Related issues
Fixes: #22851
Manual testing steps
Screenshots/Recordings
Before
Enregistrement.de.l.ecran.2024-06-25.a.14.14.10.mov
After
Enregistrement.de.l.ecran.2024-06-25.a.14.09.34.mov
Pre-merge author checklist
Pre-merge reviewer checklist