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

No Chain Info for [chain-id] Error When Adding New Chains using useChains hook #348

Closed
twhy opened this issue Oct 11, 2023 · 2 comments · Fixed by #349
Closed

No Chain Info for [chain-id] Error When Adding New Chains using useChains hook #348

twhy opened this issue Oct 11, 2023 · 2 comments · Fixed by #349
Assignees

Comments

@twhy
Copy link
Contributor

twhy commented Oct 11, 2023

From @vinodhum
Adding chains dynamically is throwing error when use useChains
ex: adding migaloo to list of chains throws below error
Error: There is no chain info for migaloo-1

const supportedChains = [
    'cosmoshub',
    'osmosis',
    'migaloo',
  ]

 const chainFromQuery = query.fromChain as string

  const walletChains = useMemo(() => {
    if (!!chainFromQuery) {
       supportedChains.push(chainFromQuery)
    }
    return supportedChains
  }, [ chainFromQuery])

  const chains = useChains(walletChains)
@twhy twhy self-assigned this Oct 11, 2023
@twhy twhy linked a pull request Oct 11, 2023 that will close this issue
@twhy twhy closed this as completed in #349 Oct 12, 2023
@vinodhum
Copy link

When switching chain, wallet still changes to status disconnected or isWalletConnected is coming as false. Secondly, when click on connect gives attached error.

"@cosmos-kit/core": "2.7.0",
"@cosmos-kit/keplr": "2.4.0",
"@cosmos-kit/react": "2.9.1"
image

@MbBrainz
Copy link

@twhy What is the status on 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

Successfully merging a pull request may close this issue.

3 participants