1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-12 04:37:13 +01:00
metamask-extension/app/scripts/controllers
Dan J Miller 904dad256f Connect Ledger via WebHID (#12411)
* Connect ledger via webhid if that option is available

* Explicitly setting preference for webhid

* Use ledgerTransportType enum instead of booleans for ledger live and webhid preferences

* Use single setLEdgerTransport preference methods and property

* Temp

* Lint fix

* Unit test fix

* Remove async keyword from setLedgerTransportPreference function definition in preferences controller

* Fix ledgelive setting toggle logic

* Migrate useLedgerLive preference property to ledgerTransportType

* Use shared constants for ledger transport type enums

* Use constant for ledger usb vendor id

* Use correct property to check if ledgerLive preference is set when deciding whether to ask for webhid connection

* Update eth-ledger-bridge-keyring to v0.9.0

* Only show ledger live transaction helper messages if using ledger live

* Only show ledger live part of tutorial if ledger live setting is on

* Fix ledger related prop type errors

* Explicitly use u2f enum instead of empty string as a transport type; default transport type to webhid if available; use constants for u2f and webhid

* Cleanup

* Wrap ledger webhid device request in try/catch

* Clean up

* Lint fix

* Ensure user can easily connect their ledger wallet when they need to.

* Fix locales

* Fix/improve locales changes

* Remove unused isFirefox property from confirm-transaction-base.container.js

* Disable transaction and message signing confirmation if ledger webhid requires connection

* Ensure translation keys for ledger connection options in settings dropdown can be properly detected by verify-locales

* Drop .component from ledger-instruction-field file name

* Move renderLedgerLiveStep to module scope

* Remove ledgerLive from function and message names in ledger-instruction-field

* Wrap ledger connection logic in ledger-instruction-field in try catch

* Clean up signature-request.component.js

* Check whether the signing address, and not the selected address, is a ledger account in singature-request.container

* Ensure ledger instructions and webhid connection button are shown on signature-request-original signatures

* Improve webhid selection handling in select-ledger-transport-type onChange handler

* Move metamask redux focused ledger selectors to metamask duck

* Lint fix

* Use async await in checkWebHidStatusRef.current

* Remove unnecessary use of ref in ledger-instruction-field.js

* Lint fix

* Remove unnecessary try/catch in ledger-instruction-field.js

* Check if from address, not selected address, is from a ledger account in confirm-approve

* Move findKeyringForAddress to metamask duck

* Fix typo in function name

* Ensure isEqualCaseInsensitive handles possible differences in address casing

* Fix Learn More link size in advanced settings tab

* Update app/scripts/migrations/066.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update ui/pages/settings/advanced-tab/advanced-tab.component.test.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Add jsdoc comments for new selectors

* Use jest.spyOn for mocking navigator in ledger webhid migration tests

* Use LEDGER_TRANSPORT_TYPES values to set proptype of ledgerTransportType

* Use LEDGER_TRANSPORT_TYPES values to set proptype of ledgerTransportType

* Fix font size of link in ledger connection description in advanced settings

* Fix return type in setLedgerTransportPreference comment

* Clean up connectHardware code for webhid connection in actions.js

* Update app/scripts/migrations/066.test.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update ui/ducks/metamask/metamask.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Add migration test for when useLedgerLive is true in a browser that supports webhid

* Lint fix

* Fix inline-link size

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-11-04 11:48:52 -07:00
..
ens use safer toChecksum utility (#11117) 2021-05-17 16:19:39 -05:00
network Replace hardcoded sent ether label on confirm screen (#11802) 2021-09-15 16:54:51 -05:00
permissions Add eth_feeHistory to safe method list (#11999) 2021-09-02 10:26:32 -07:00
transactions Use rejected constant within transaction state manager (#12458) 2021-10-25 08:01:30 -05:00
alert.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
app-state.js Stop GasFeeController polling when pop closes (#11746) 2021-08-04 16:53:13 -05:00
cached-balances.js cache balances by chain id (#10545) 2021-03-02 16:53:07 -06:00
cached-balances.test.js Use strict assertion mode everywhere (#11012) 2021-05-07 17:08:24 -02:30
detect-tokens.js Turning OFF token detection for test nets (#12232) 2021-09-29 14:53:56 -04:00
detect-tokens.test.js Turning OFF token detection for test nets (#12232) 2021-09-29 14:53:56 -04:00
incoming-transactions.js add maxPriorityFeePerGas and maxFeePerGas to incoming controller (#11367) 2021-06-24 14:52:14 -05:00
incoming-transactions.test.js add maxPriorityFeePerGas and maxFeePerGas to incoming controller (#11367) 2021-06-24 14:52:14 -05:00
metametrics.js Removing obsolete client-side transaction metrics events (#11329) 2021-06-24 15:37:44 -07:00
metametrics.test.js Removing obsolete client-side transaction metrics events (#11329) 2021-06-24 15:37:44 -07:00
onboarding.js Migrate completedOnboarding and firstTimeFlowType state into onboardingController (#12356) 2021-10-15 13:52:52 -05:00
preferences.js Connect Ledger via WebHID (#12411) 2021-11-04 11:48:52 -07:00
preferences.test.js Changing Use Token detection to OFF by default (#12129) 2021-09-16 13:07:23 -04:00
swaps.js Fix parallel calls for quotes in swaps (#12484) 2021-11-02 11:43:25 -07:00
swaps.test.js Fix parallel calls for quotes in swaps (#12484) 2021-11-02 11:43:25 -07:00
threebox.js Add some metrics events to the 3box controller (#11447) 2021-07-02 17:00:40 -02:30