Moralis.transfer : How do I deal with errors about cancelling transfers?

Moralis.transfer : How do I deal with errors if user cancelling token transfers?

I am using the moralis.transfer function.

I try to take action if the token transfer is successful and not take action if it fails.

How do I know that the user refused to send the token and how do I handle the error?

what did you try by now?

you should check if the transfer made it to the chain, even if the transaction was approved, you are not 100% sure that it will make it to the chain

you can use web3api to check the status, or event sync in your Moralis Server

If you receive an error message when trying to send a token, it means that the user has refused to send it. You can try again later or ask the user to send the token directly to your wallet.