cosmology-tech / cosmos-kit

Universal wallet connector for the Cosmos ⚛️
https://cosmology.zone/products/cosmos-kit
BSD 3-Clause Clear License
183 stars 136 forks source link

Unable to connect to installed wallet extension when not installed wallet extensions fail to init #396

Open GadAlmighty opened 10 months ago

GadAlmighty commented 10 months ago

Starting recently for us, connecting to a wallet is silently failing when wallets that the user does not have installed are included in the ChainProvider wallets list.

For example, in a browser context with just Keplr installed, when the app is initialised with just the keplr wallet extension, the connect flow works as expected. However, when the leap and/or xdefi wallet extensions (the other wallets we currently support) are included in the wallets list, we see an initClientError: Client Not Exist! log for each of the not installed wallets and when trying to connect to Keplr again the connection flow fails silently (the wallet modal is dismissed but the wallet remains disconnected.

The package versions being used are:

    "@cosmos-kit/core": "^2.8.5",
    "@cosmos-kit/keplr": "^2.6.5",
    "@cosmos-kit/leap": "^2.6.5",
    "@cosmos-kit/react": "^2.10.5",
    "@cosmos-kit/xdefi": "^2.5.5",
liujun93 commented 10 months ago

@GadAlmighty I can't reproduce it with the latest version core@2.8.8. can you update all to the latest version and try again? If it happened again, can you provide a example repo to reproduce the error?

CalicoNino commented 10 months ago

@liujun93 I am currently having the same issue as well. I have everything latest.

I am console logging the status below Screenshot from 2024-02-07 16-49-33

I believe the error is 2 fold.

  1. It does not have the Not Exist status anymore
  2. It is unable to detect already existing Leap, metamask leap and cosmostation.

    • I tried this in chrome and it is unable to detect them

    I would be happy to set up a dummy project and tag you in it