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

Connection with injected wallet #3705

Closed
1 task done
AleksHirsch opened this issue Mar 14, 2024 · 2 comments
Closed
1 task done

Connection with injected wallet #3705

AleksHirsch opened this issue Mar 14, 2024 · 2 comments

Comments

@AleksHirsch
Copy link

Describe the bug

Hey pals, i'm using RainbowKit in my app and this is my config

export const config = createConfig({
  chains: [sepolia],
  connectors: getWalletConnectors(),
  ssr: true,
  transports: {
    [sepolia.id]: http('https://rpc.ankr.com/eth_sepolia'),
    [mainnet.id]: http('https://rpc.ankr.com/eth'),
  },
})

getWalletConnectors returns some rainbowkit providers except metamask and brave (which appear as installed due to multiInjectedProviderDiscovery being enabled by default)

The problem is that if I connect my MetaMask, disconnect and refresh the page - the connection to metamask is persisted, but it should be kept disconnected as shimDisconnect is true by default. And here's where things get weird. Every disconnect + refresh updates local storage with new entry:

wagmi.<random wallet name>.disconnected: true

I disconnect, refresh and again - new entry with random wallet I haven't even used appears. After disconnecting a few times, it starts working as expected - the connection is lost until I connect manually. Can someone tell me what's going on? :D

Even if you go to https://www.rainbowkit.com/docs/introduction I have to disconnect 2 times to make it work 🤔

Link to Minimal Reproducible Example

No response

Steps To Reproduce

No response

Wagmi Version

2.5.7

Viem Version

2.7.19

TypeScript Version

No response

Check existing issues

Anything else?

No response

@tmm
Copy link
Member

tmm commented Mar 15, 2024

Duplicate #3606

@tmm tmm closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants