-
Notifications
You must be signed in to change notification settings - Fork 621
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 declined. Connection can be declined if a previous request is still active #4311
Comments
Any update on this? Currently experiencing the same error. |
Having this same issue |
Literally dealing with same thing right now. I have no connection windows open or anything. |
I'm also facing the same problem. |
We are on the same league. Waiting hero to come now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in https://github.com/orgs/WalletConnect/discussions/4310
Originally posted by Ay7ot March 9, 2024
This is my first time working with Web3Modal and I'm using react. I'm running into a kind of bug. When Itry to connect from a mobile browser or a browser that doesn't have an extension installed, i get the error Connection declined. Connection can be declined if a previous request is still active.
My Context provider code looks like this:
`import { createWeb3Modal } from '@web3modal/wagmi/react'
import { defaultWagmiConfig } from '@web3modal/wagmi/react/config'
import { injected, metaMask, safe, walletConnect } from 'wagmi/connectors'
import { WagmiProvider } from 'wagmi'
import { arbitrum, mainnet } from 'wagmi/chains'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
// 0. Setup queryClient
const queryClient = new QueryClient()
// 1. Get projectId at https://cloud.walletconnect.com
const projectId = 'MY_PROJECT_ID'
// 2. Create wagmiConfig
const metadata = {
name: 'Web3Modal',
description: 'Web3Modal Example',
url: 'http://localhost:5173', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/37784886']
}
const chains = [mainnet, arbitrum]
const config = defaultWagmiConfig({
chains, // required
projectId, // required
metadata, // required
})
// 3. Create modal
createWeb3Modal({
wagmiConfig: config,
projectId,
enableAnalytics: true // Optional - defaults to your Cloud configuration
})
export function ContextProvider({ children }) {
return (
{children}
)
}`
I basically followed the doc on installation and I dont know why this is happening.
My button is in my app folder and yes, i wrapped my App in ContextProvider.
The text was updated successfully, but these errors were encountered: