brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.08k stars 2.23k forks source link

Wallet HD path is wrong for legacy #19883

Closed scmart closed 2 years ago

scmart commented 2 years ago

When connecting to a Ledger S hardware wallet, and using "Legacy (MEW/MyCrypto)", only the first address is correct.

Steps to Reproduce

  1. Connect Ledger Nano S
  2. Add Account
  3. Select Legacy (MEW/MyCrypto)

Actual result:

Addresses 2-5 (and probably beyond) are the wrong addresses.

Expected result:

Addresses 2-5 should match what MEW, MyCrypto, and metamask with the legacy option list.

Reproduces how often:

Always

Brave version (brave://version info)

Version 1.32.113 Chromium: 96.0.4664.45 (Official Build) (64-bit) Ubuntu 20.04

Miscellaneous Information:

A minor note, the UI experience switching between Ledger Live and Legacy is bad. It reverts to the connect to HW wallet view, where I though I had to reclick connect, so I did, followed by an error, before it then snaps back to the address list.

srirambv commented 2 years ago

cc: @onyb @darkdh

scmart commented 2 years ago

@srirambv Seems like this should be an easy and important fix. Hard to use the Brave wallet when most of my addresses aren't discoverable.

scmart commented 2 years ago

Still broken in Version 1.35.101

@spylogsster @srirambv @onyb @darkdh

spylogsster commented 2 years ago

will take a look tomorrow, thanks @scmart for the reminder

bbondy commented 2 years ago

Shouldn't we permanently have a third option now to have the other derivation path in case someone used those addresses and wants to get access again via a new import?

spylogsster commented 2 years ago

Shouldn't we permanently have a third option now to have the other derivation path in case someone used those addresses and wants to get access again via a new import?

follow-up issue https://github.com/brave/brave-browser/issues/21171

kjozwiak commented 2 years ago

This was originally uplifted/scheduled to go into a 1.35.x HF but never ended up being released. It will go out via 1.36.x as we won't be having another 1.35.x release at this point.

srirambv commented 2 years ago
Brave 1.36.106 Chromium: 99.0.4844.45 (Official Build) (64-bit)
Revision edbc0b8343c7b10fddb0e1b4efb280b0f6e38cab-refs/branch-heads/4844@{#788}
OS :ballot_box_with_check: Linux :ballot_box_with_check: Windows 11 Version Dev
(Build 22523.1000)
:ballot_box_with_check: macOS Version 12.0.1
(Build 21C52)
  • Verified test plan from brave/brave-core#12314
  • Verified import accounts with Legacy derivation path from MM and Brave Wallet works
  • Verified imported accounts on both legacy and live are both same on MM and Brave Wallet