2

Why would I do polling with getTransaction or getSignatureStatus, when I can just use sendAndConfirm to check the tx status?

1 Answer 1

2

I can see polling to be useful if I wanted to display the TX state in realtime.

Although it seems like sendAndConfirm is an abstracted method on top of getSignatureStatus polling

Answer 1:

You can't sendAndConfirm on the frontend using the wallet adapter. You gotta use the wallet's sign method, then send the signed transaction, and thus you will have to poll the transaction status to check for inclusion in a block

Answer 2

It's useful for fault tolerance -- If you're sending a tx from a server w/ sendAndConfirm, and the server crashes, when you start up again, you have no idea of which transactions were in progress.

More context and answers in this twitter thread.

Your Answer

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

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