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

Remove hardcoded cointype ID in isEthermintLike function #848

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hitchhooker
Copy link

@hitchhooker hitchhooker commented Oct 2, 2023

Title:

Remove hardcoded cointype ID in isEthermintLike function

Description:

Problem Statement:

The hardcoded cointype ID of 60 in the isEthermintLike function limits its flexibility and causes issues for networks that do not use this cointype, such as the Kava testnet.

Proposed Changes:

  • Removed the hardcoded condition chainInfo.bip44.coinType === 60 || from the isEthermintLike function.

Background:

As per Kava Labs' new update, Kava Mainnet adopted a new cointype ID, moving away from the standard cointype of 60. This change makes it necessary to remove the hardcoded value to make Keplr Wallet compatible with other networks, including Kava testnet.

Background information
Resolves #800 Github Issue

Files Changed:

  • packages/background/src/keyring/service.ts
@@ -1265,7 +1265,6 @@ export class KeyRingService {
  static isEthermintLike(chainInfo: ChainInfo): boolean {
    return (
-     chainInfo.bip44.coinType === 60 ||  
      !!chainInfo.features?.includes("eth-address-gen") ||
      !!chainInfo.features?.includes("eth-key-sign")
    );
  }

Impact:

This change will make Keplr Wallet more flexible and allow compatibility with networks that do not use the hardcoded cointype ID.

https://github.com/chainapsis/keplr-chain-registry/blob/main/cosmos/kava_2222.json

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.

1 participant