detect-provider icon indicating copy to clipboard operation
detect-provider copied to clipboard

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

Open rhythmshandlya opened this issue 3 years ago • 1 comments

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

rhythmshandlya avatar Feb 08 '22 07:02 rhythmshandlya

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.

mcmire avatar Oct 05 '22 16:10 mcmire