When exactly are transactions "accepted" by Moralis?

Hi all,
Suppose I have this code:

const message = await Moralis.executeFunction(options)
        .then( () => {
        .catch((e) => {

What is it exactly that would make the code output success or error?
The tx getting into the node’s mempool?

for example, if you don’t sign the transaction, you may get that error

is there a chance that after I get success, that the transaction still wont “get through” and stay unconfirmed forever?

I think that you can wait that transaction a number of blocks if you want, maybe in that code block where you log success

you should check if the transaction made it to the chain after that if you want to make sure that it made it to the chain

Here’s my usecase:
I want the user to be able to list an NFT for sale. This involves making a transaction (calling a smart contract function). After the transaction is confirmed, the UI will show that the nft is listed for sale.
Before the tx is confirmed, however, I want the user to see that his tx is being processed or some message like that. The thing is, what if the tx got into the mempool, so Moralis picked it up and shows it as unconfirmed, but then the nodes for whatever reason never processed it? The UI would be stuck forever unless I changed it manually.
Am I making sense?

you could add some kind of timeout to that waiting in ui, if it took 2 minutes, then maybe something didn’t work. you can check later with web3api to see if that transaction made it to the chain, or in parallel from x to x seconds

1 Like

Perfect, thank you very much