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

fix: 25457 firefox extension not work for trezor connect #25487

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

dawnseeker8
Copy link
Contributor

@dawnseeker8 dawnseeker8 commented Jun 24, 2024

#25457 Because firefox doesn't support usb api, which cause the window.navigator.usb is undefined in firefox, which break the trezor connection.

This PR will check whether window.navigator.usb is undefined or not. if yes, then select-hardware will fall back to use trezor bridge to connect.

Description

Open in GitHub Codespaces

Related issues

Fixes: #25457

Manual testing steps

  1. Open metamask in firefox
  2. select account drop down in home page and then select Add Account and hardware wallet
  3. select trezor in hardware select screen.
  4. approve at trezor screen
  5. you should be able to select accounts from trezor.

Screenshots/Recordings

Before

After

Screen.Recording.2024-06-24.at.15.59.20.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

…e to firefox not support USB api.

if usb is undefined detected, system will fallback to use trezor bridge.
@dawnseeker8 dawnseeker8 requested a review from a team as a code owner June 24, 2024 13:40
Copy link
Contributor

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.

@dawnseeker8 dawnseeker8 added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) and removed team-accounts labels Jun 24, 2024
@dawnseeker8 dawnseeker8 added the e2e-test End to end test for the MetaMask extension label Jun 24, 2024
@dawnseeker8 dawnseeker8 added the Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. label Jun 24, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.19%. Comparing base (6414137) to head (93cfd69).
Report is 8 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25487   +/-   ##
========================================
  Coverage    65.19%   65.19%           
========================================
  Files         1405     1405           
  Lines        55571    55571           
  Branches     14592    14592           
========================================
  Hits         36229    36229           
  Misses       19342    19342           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [e0ee6aa]
Page Load Metrics (50 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint661008194
domContentLoaded9281142
load40725094
domInteractive9281142
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 22 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

danjm
danjm previously approved these changes Jun 24, 2024
itsyoboieltr
itsyoboieltr previously approved these changes Jun 24, 2024
@danjm danjm dismissed stale reviews from itsyoboieltr and themself via 93cfd69 June 24, 2024 18:54
Copy link
Contributor

@davidmurdoch davidmurdoch left a comment

Choose a reason for hiding this comment

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

🚀

@metamaskbot
Copy link
Collaborator

Builds ready [93cfd69]
Page Load Metrics (53 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint701018594
domContentLoaded9181221
load42695384
domInteractive9181121
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 22 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@danjm danjm merged commit f90eed6 into develop Jun 24, 2024
74 checks passed
@danjm danjm deleted the fix/25457-trezor-issue-firefox branch June 24, 2024 20:35
@github-actions github-actions bot locked and limited conversation to collaborators Jun 24, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jun 24, 2024
@metamaskbot metamaskbot added release-12.1.0 Issue or pull request that will be included in release 12.1.0 release-11.16.15 Issue or pull request that will be included in release 11.16.15 and removed release-12.1.0 Issue or pull request that will be included in release 12.1.0 labels Jun 24, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-11.16.15 on PR. Adding release label release-11.16.15 on PR and removing other release labels(release-12.1.0), as PR was cherry-picked in branch 11.16.15.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e2e-test End to end test for the MetaMask extension release-11.16.15 Issue or pull request that will be included in release 11.16.15 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-hardware-wallets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot connect Trezor on Firefox on version 11.16.10-11.6.7 or earlier. (After 11.16,0)
5 participants