web3-react
web3-react copied to clipboard
Cannot activate WalletConnect after click close button(The user rejected the request)...
dependencies: "@web3-react/walletconnect-connector": "^6.2.8",
I cannot activate WalletConnect again after click close button below...

Yup, can reproduce this.
would accept a bug fix PR for this
fwiw this may be an issue in walletconnect itself: https://github.com/WalletConnect/walletconnect-monorepo/issues/747
tina is correct, and also this only affects v6 (it's handled via a workaround in v8)
I workaround by set the walletConnectProvider to undefined before activate
import { WalletConnectConnector } from '@web3-react/walletconnect-connector';
const walletConnect = new WalletConnectConnector({
infuraId: process.env.NEXT_PUBLIC_INFURA_ID,
});
async function connectWalletConnect() {
walletConnect.walletConnectProvider = undefined;
try {
await activate(walletConnect,);
} catch (ex) {
console.log(ex);
}
}
I have a question,where is the "activate" method from? Which library should I to import?