Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ethereum config #236

Closed
wants to merge 3 commits into from
Closed

fix ethereum config #236

wants to merge 3 commits into from

Conversation

haider-rs
Copy link
Contributor

Description

Fix ethereum derivation path.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

Describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:

Code review prechecks:

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Inline comments have been added for each method
  • I have made corresponding changes to the documentation
  • Code changes introduces no new problems or warnings
  • Test cases have been added
  • Dependent changes have been merged and published in downstream modules

@haider-rs haider-rs requested a review from Lohann May 9, 2024 14:05
// proper bip44 ids are here: https://github.com/satoshilabs/slips/blob/master/slip-0044.md
// but famous wallets i.e. metamask, trust wallet uses 60 as coin_type' for ethereum chains.
// Reference: https://support.metamask.io/managing-my-wallet/secret-recovery-phrase-and-private-keys/importing-a-seed-phrase-from-another-wallet-software-derivation-path/
let bip44_id = 60;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that not all networks use the 60 bip44 id, Ethereum Classic and it's testnets for example use 61, so instead of make this bip44 default for all blockchains, I would prefer to one of the following options:

1 - Explicitly refactor all EVM testnets, for using the bip44 60 instead of 1.
2 - Or.. make the bip44_id of this function optional, and use 60 by default.

@haider-rs
Copy link
Contributor Author

Upon discussing in private channel. This is complicated more than it seems and should be properly fixed after discussing the go to solution:

Lohann:

To address this would be better to expose a way to provide the private key, or the mneumonic + BIP-38 path explicitly.

@haider-rs haider-rs closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants