ApeWorX / ape-ledger

Ledger Nano S and X account plugin for the Ape Framework
https://www.apeworx.io/
Apache License 2.0
6 stars 7 forks source link

HD-Path is stored incorrectly for accounts after the 5th entry [APE-983] #36

Closed Dex-C closed 1 year ago

Dex-C commented 1 year ago

Environment information

$ ape --version
0.6.10

$ ape plugins list
Installed Plugins:
  arbitrum     0.6.0
  ledger       0.6.0
  infura       0.6.1
  etherscan    0.6.5.dev2+g46af3fe

What went wrong?

Please include information like:

I added my ledger account from the HD path 'm/44'/60'/24'/0/0' by running "ledger add" and flipped pages to select the account I want to add

However, it seems ape-ledger is ignoring the page flip and registered the accounts associated with 'm/44'/60'/4'/0/0'

How can it be fixed?

Right now I forcibly fixed it by replacing " account_data = {"address": address, "hdpath": hdpath}"

with

" account_data = {"address": address, "hdpath": "m/44'/60'/24'/0/0"}"

in accounts.py

fubuloubu commented 1 year ago

think it might be this line missing the offset: https://github.com/ApeWorX/ape-ledger/blob/2a9786ec951f96d444bcce37e211336f5fa94d7c/ape_ledger/choices.py#LL73C40-L73C40