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

First modal view sometimes auto connecting to the second wallet in the list #380

Closed
vexxvakan opened this issue Dec 15, 2023 · 9 comments · Fixed by #386
Closed

First modal view sometimes auto connecting to the second wallet in the list #380

vexxvakan opened this issue Dec 15, 2023 · 9 comments · Fixed by #386

Comments

@vexxvakan
Copy link

@pyramation I updated to the latest cosmos-kit and chain-registry version, and i have encountered a different error. When im connecting the wallet, it first shows the "cosmostation not installed" error and then i have to click x to go to the wallet connection screen.

I made a small loom to show what is happening:
https://www.loom.com/share/dfdd19246d2b4cd0ba35fa53f761fc48?sid=6094e036-adba-4e81-88fc-5f13bd700dfb

The exact versions of cosmos-kit i have installed during this error are:

{
    "@cosmjs/stargate": "^0.31.3",
    "@cosmos-kit/core": "2.7.10",
    "@cosmos-kit/cosmostation": "2.5.0",
    "@cosmos-kit/keplr": "2.5.0",
    "@cosmos-kit/keplr-extension": "^2.6.0",
    "@cosmos-kit/leap": "2.5.0",
    "@cosmos-kit/leap-extension": "^2.6.0",
    "@cosmos-kit/react": "2.9.14",
    "@cosmos-kit/terrastation": "^0.1.7",
    "@cosmos-kit/xdefi-extension": "2.5.12",
	...
    "chain-registry": "^1.23.0",
    }

Originally posted by @MbBrainz in #372 (comment)

@liujun93
Copy link
Contributor

@vexxvakan the local storage will store the current wallet name in cosmos-kit@2:core//current-wallet once you tried to connect the wallet, no matter you connected or rejected or the wallet not installed. So the next time you open the same site (within the session duration, by default 30mins), it will automatically connect the wallet stored in cosmos-kit@2:core//current-wallet.

if you don't want this feature, you can choose to remove cosmos-kit@2:core//current-wallet in local storage when tab closed

@vexxvakan
Copy link
Author

@liujun93 no, for some reason when clearing cache and opening cosmos-kit wallet modal for the first time it opens at the rejected view of the second wallet in the list... I can create a loom video when I am back at work. Reconnecting works just fine however 👍

This bug also happens for me on the cosmos kit docs so its not caused by our custom wallet modal either

@twhy
Copy link
Contributor

twhy commented Dec 18, 2023

@vexxvakan Please upgrade @cosmos-kit/react to ^2.9.16. This should be fixed in this version that just published.

@MbBrainz
Copy link

Bumping @cosmos-kit/react to 2.9.16 gave me the following build error: Module not found: Can't resolve '@interchain-ui/react/styles' that wasn't there on 2.9.6. Reverted for now.

@twhy
Copy link
Contributor

twhy commented Dec 18, 2023

@MbBrainz What version of Next.js are you using ?

@vexxvakan
Copy link
Author

@twhy we are on Next 13.4.8. The initial issue is fixed by the new release according to what I can see so far, this is on a branch that uses react-lite and a custom wallet modal so the styles issue wouldnt come up here,

@twhy
Copy link
Contributor

twhy commented Dec 18, 2023

@vexxvakan OK. I can reproduce this issue on my side now and will fix it ASAP.

twhy added a commit that referenced this issue Dec 21, 2023
First modal view sometimes auto connecting to the second wallet in the list
#380
@twhy twhy linked a pull request Dec 21, 2023 that will close this issue
@twhy
Copy link
Contributor

twhy commented Dec 21, 2023

This issue can be reproduced in this way

  1. Connect to a extension wallet you haven't installed / enabled
  2. Close the modal
  3. Refresh the page
    The actual issue is the modal shows the Install Wallet view when modal opens for the wallet that is not installed.

@twhy twhy removed a link to a pull request Dec 23, 2023
twhy added a commit that referenced this issue Dec 23, 2023
@twhy twhy linked a pull request Dec 23, 2023 that will close this issue
liujun93 added a commit that referenced this issue Dec 26, 2023
@blackpanther1881
Copy link

@twhy I'm still facing same issue, when I use openView from useChain, default walletRepo getting as cosmostationExtension

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.

5 participants