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

Support development in kadenaHostGenerator #2853

Open
2 of 3 tasks
ggobugi27 opened this issue Feb 5, 2025 · 1 comment
Open
2 of 3 tasks

Support development in kadenaHostGenerator #2853

ggobugi27 opened this issue Feb 5, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@ggobugi27
Copy link
Contributor

Please confirm the following:

Is your feature request related to a problem?

Running an app that uses the function, kadenaHostGenerator on devnet fails with the error, UNKNOWN_NETWORK_ID: development.

Describe the solution you'd like

Add on option for networkId=development in the function, kadenaHostGenerator.

Describe alternatives you've considered

No response

Do you have any additional context?

The error was found while running the app, marmalade-marketplace on devnet.

Participation

  • I am willing to submit a pull request for this feature request.
@ggobugi27 ggobugi27 added the enhancement New feature or request label Feb 5, 2025
@javadkh2
Copy link
Collaborator

javadkh2 commented Feb 5, 2025

Adding devnet to the function wouldn’t be general enough because users always can use different port or networkId for any reason
Configuring client for other networks is very straightforward
You can create your own function

const myHostGenerator = ( {networkId, chainId} ) => {
  If (networkId === “development”) return “http://localhost:1234/……”;
  return kadenaHostGenerator( {networkId, chainId} )
}

const client = createClient(myHostGenerator)

Also all client-utils function support custom hostGenerator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants