Hi, I have a useEffect in my react project which enables web3 every page load. This is so that I do not lose the web3 instance even if the user refreshes my react app.
useEffect(
() => async () => {
if (isAuthenticated) {
console.log("INSIDE EFFECT AUTHENTICATED BUT NO WEB3");
await Moralis.enableWeb3();
}
}
, []
);
However, I noticed in my console that I have
Cannot execute Moralis.enableWeb3(), as Moralis Moralis.enableWeb3() already has been called, but is not finished yet
My question is, is there a moralis state like isAuthenticating for enable web3? Is this something I have to do manually in my react state? Or do you have any tips on how to elegantly handle this?
Thank you