Im building a dapp on MetaMask and the MetaMask browser pops up but just keeps on loading( showing the spinning icon ) and gets stuck that way and when i close it , the console logs that user rejected the transaction. Im stuck and im at my wits end on what to do.
Nb. heres the code
const contractMethod = new ethers.Contract(
contractAddress2,
AbiErc20,
signer
);
//get user approve function
await contractMethod.approve(approveaddress, amount);
console.log("Approved");
Do you have any more information on this? It’s fairly easy to handle the error in case the user rejects the prompt, but are you saying that you are not rejecting the MetaMask prompt and you are still getting this error saying so?
Do you have any screenshots or video of the issue? Anything to provide some additional context?