I have got this error when calling function after walletconnect. I can get wallet address after walletconnect, but when calling function "whiteListMint", got this error. Why metamask error?
const walletconnect = new WalletConnectConnector({
rpcUrl: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`,
bridge: 'https://bridge.walletconnect.org',
qrcode: true,
pollingInterval: POLLING_INTERVAL,
})
const connectwallet = async (activate) => {
try {
await activate(walletconnect);
} catch (error) {
console.log(error);
}
};
const handleWhiteListMint = async () => {
if (active) {
if (!mintStats) {
return;
}
const id = toast.loading("Transaction pending");
whiteListMint(
account,
parseInt(quantity),
mintStats?.feePerQuantity
);