shapeshift / web

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

chore: open ledger drawer styling & error handling #6790

Closed 0xApotheosis closed 2 weeks ago

0xApotheosis commented 2 weeks ago

Description

Pull Request Type

Issue (if applicable)

Closes https://github.com/shapeshift/web/issues/6720

Risk

High Risk PRs Require 2 approvals

Low - only style changes

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. See the new styling
  6. Click "Next" without opening the correct Ledger app and see the error toast

Engineering

☝️

Operations

☝️

Screenshots (if applicable)

Screenshot 2024-05-01 at 12 56 14 PM Screenshot 2024-05-01 at 12 56 37 PM Screenshot 2024-05-01 at 12 56 43 PM Screenshot 2024-05-01 at 1 11 03 PM
0xApotheosis commented 2 weeks ago

gm @gomesalexandre, ty for the excellent review.

I've unified the EVM connections/UI to use the Ethereum app in https://github.com/shapeshift/web/pull/6790/commits/265120d4a467506fb2c45062770e6edb78d67e01

We still have the THORChain connection issue, which I suspect is caused by await this.transport.call(null, "getAppAndVersion") returning THORChain, whereas the slip key is written as Thorchain in HDWallet's slip44Table (I suspect incorrectly, as SLIP-0044 lists it as THORChain too).

This might require another HDWallet update to fix, which I'll look into tomorrow in a separate PR 🙏