Utility Functions
Monitor Transactions (awaitTxConfirm
)
awaitTxConfirm
)This is a simple function that can be called to verify if a transaction has landed on-chain yet. It can be very useful for creating a UI component to display the TX submission status after an on-chain action.
It returns either true if the transaction has landed on-chain or false if the transaction has not landed on-chain yet.
Our recommendation is to create some sort of loop or interval to call this function every couple of seconds until it returns true.
Parameters:
txId: The transaction ID to monitor for confirmation of landing on-chain. Any of the Agora SDK function calls will return this information.
Last updated