Skip to content

WalletConnect incompatible chain ID #869

@pyncz

Description

@pyncz

Summary of the Bug

shentu-2.2 chain ID is not compatible with WalletConnect.
It can't be added as a chain in WalletConnect's SignClient, as it doesn't follow CAIP-2 chain reference standard.

As a result, you can't connect with that chain.
I believe, exact wallet behaviour varies depending on specific wallet (whether they handle that error or not), but in case of Leap Cosmos wallet, for example, it causes infinite loading.

Steps to Reproduce

It's kinda tricky, because I tried it with custom closed-source WalletConnect+cosmos integration, but these steps must show the issue:

  • Sign up a WalletConnect account here: https://cloud.walletconnect.com/sign-up
  • Create a projectID
  • Clone this repo: https://github.com/WalletConnect/web-examples/tree/main/advanced/dapps/react-dapp-v2-cosmos-provider
  • Create .env.local file in /advanced/dapps/react-dapp-v2-cosmos-provider subdir and setup the env with your project ID:
    NEXT_PUBLIC_PROJECT_ID=...
    NEXT_PUBLIC_RELAY_URL=wss://relay.walletconnect.com
  • Add your chain info in ./src/chains/cosmos.ts (in CosmosChainData AND CosmosMetadata) and chain Id in./src/constants/default.ts (in DEFAULT_MAIN_CHAINS)
  • Run it and try to connect reading the QR code with your mobile wallet (again, tested with Leap).
  • ???
  • ?????
  • ???okay it's infinite loading

Expected behaviour

Connects smoothly 🤌


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions