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

How to customize the network constants for test? #7

Open
linxux opened this issue Oct 9, 2021 · 2 comments
Open

How to customize the network constants for test? #7

linxux opened this issue Oct 9, 2021 · 2 comments

Comments

@linxux
Copy link

linxux commented Oct 9, 2021

How to override the CHAIN_DATA_LIST?
Seems it is unable to use this lib for new networks since the connector will check the ChainId in CHAIN_DATA_LIST?

Or any example to customize the provider with custom-xxxx?

export function getChainId(network) {
    const chains = Object.values(CHAIN_DATA_LIST);
    const match = filterMatches(
        chains,
        x => x.network === network,
        undefined
    );
    if (!match) {
        throw new Error(`No chainId found match ${network}`);
    }
    return match.chainId;
}
@linxux
Copy link
Author

linxux commented Oct 9, 2021

Or would you please help to add the new network - 'OEC' into CHAIN_DATA_LIST

  "65":{
    "chainId":65,
    "chain":"okexchain",
    "network":"oec-test",
    "networkId":65
  },
  "66":{
    "chainId":66,
    "chain":"okexchain",
    "network":"oec",
    "networkId":66
  }

@linxux
Copy link
Author

linxux commented Oct 29, 2021

@SmallRuralDog Hi, sir. Any update for this?

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

No branches or pull requests

1 participant