shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
157 stars 180 forks source link

chore: add LedgerOpenApp drawer #6779

Closed 0xApotheosis closed 2 weeks ago

0xApotheosis commented 2 weeks ago

Description

Adds LedgerOpenApp drawer, which shows when a Ledger is connected.

It will automatically call onNext() when the appropriate app is opened.

Note, this component isn't meant to be pretty yet, it's just meant to implement the app detection logic.

Pull Request Type

Issue (if applicable)

Contributes to https://github.com/shapeshift/web/issues/6720

Risk

High Risk PRs Require 2 approvals

Small - just adds a new component with no logic on a flagged path.

What protocols, transaction types or contract interactions might be affected by this PR?

None.

Testing

Ensure REACT_APP_FEATURE_ACCOUNT_MANAGEMENT and REACT_APP_FEATURE_ACCOUNT_MANAGEMENT_LEDGER feature flags are enabled.

  1. Connect a Ledger
  2. Click "Manage Accounts" from the wallet menu
  3. Click "Add another chain"
  4. Select a Ledger supported chain using the drawer
  5. Open the corresponding Ledger app - the onNext handler should automatically be called. The "Next" button should also log an error to the console if the correct app isn't open (temporary, we'll handle this better with an alert or something).

Engineering

☝️

Operations

☝️

Screenshots (if applicable)

Screenshot 2024-04-30 at 5 47 05 PM