Hi, I’m using https://github.com/MoralisWeb3/react-moralis#useweb3contract to make calls to smart contract methods.
In my case I’m using it to call an approve on a ERC20 token and when I receive onSuccess callback I call a transfer (pretty standard stuff)
The second call (transfer) most of the time returns an error (execution reverted: ERC20: transfer amount exceeds allowance) because the first call (approve) has not yet changed the data in the smart contract.
Am I doing something wrong?
How to solve this issue?