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

(WARNING) MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead. #40

Open
rhythmshandlya opened this issue Feb 8, 2022 · 1 comment

Comments

@rhythmshandlya
Copy link

The code:

 useEffect(() => {
        const loadProvider =async () => { 
            const provider = await detectEthereumProvider()

            if (provider) {
                const web3 = new Web3(provider);

                setWeb3Api({
                    provider: provider,
                    web3: web3,
                    contract: null,
                    isLoading: false
                });

            } else {
                setWeb3Api({
                    ...web3Api,
                    isLoading: false
                });
                console.error('Please install MetaMask!')
            }
        }  
        loadProvider();
    }, [])

image

@mcmire
Copy link
Contributor

mcmire commented Oct 5, 2022

Hi @rhythmshandlya, so sorry that it's taken us so long to respond to this. If you're still having issues would you mind telling us whether you're still seeing this error and which library you're using (i.e. where does Web3 come from)? Thanks.

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

No branches or pull requests

2 participants