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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion chains/ethereum/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,15 @@ fn evm_config(
blockchain: &'static str,
network: &'static str,
symbol: &'static str,
bip44_id: u32,
_bip44_id: u32,
is_dev: bool,
) -> BlockchainConfig {
// hard codes bip44_id to 60
// 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.


BlockchainConfig {
blockchain,
network,
Expand Down
Loading