mikeshultz / ledger-eth-lib

Library to interface with Ethereum app on Ledger hardware wallets
https://ledgereth.readthedocs.io/
MIT License
19 stars 9 forks source link

Instances of LedgerAccount with the same attributes are currently evaluated as different #50

Closed moisses89 closed 12 months ago

moisses89 commented 1 year ago

Thanks for this project, is really helpful for communicate with Ledger using python :)

Issue Description

Instances of LedgerAccount with the same attributes are currently evaluated as different.

from ledgereth.accounts import LedgerAccount, get_account_by_path
from ledgereth.comms import init_dongle
dongle = init_dongle()
account_one = get_account_by_path("44'/60'/0'/0/0", dongle)
account_two = get_account_by_path("44'/60'/0'/0/0", dongle)
account_one == account_two

Where account_one == account_two is evaluated as False.

Expected behavior

I'd like to suggest that instances of LedgerAccount with same attributes were evaluated as equals.

Related issue

https://github.com/safe-global/safe-cli/issues/302