0

I have a weird behavior when I call a function (mint) with a wrong RPC...First of all let me show you a function triggering properly an error in my code:

const fetchBalance = (addressTemp) => {
    web3.eth
      .getBalance(addressTemp)
      .then((result) => {
        setBalance(web3.utils.fromWei(bal));
      })
      .catch((error) => {
        console.error(error);
      });
  };

this throw the error (as it should):

RPC Error: [-32603] Internal error: Network Error

Now on the other hand, my Mint call, simply get stuck and do nothing:

let { transactionHash } = await contractAudio.methods
      .mint(
        _user.publicAddress,
      )
      .send({ from: _user.publicAddress })
      .then(function (transactionHash) {
        console.log(`transactionHash: ${transactionHash}`);
      })
      .then(function (receipt) {
        console.log(receipt);       
      })
      .catch(function (error) {
        console.log(`error: ${error}`);
      });

Would you know what I'm doing wrong? Thanks a lot for your help!

1 Answer 1

1

it is now working as expected, I guess it was an error/slowdown on Mumbai

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.