I am trying to wait for the receipt as long as my transaction is valid.
At the moment, I use the TransactionReceiptQuery
method in a loop, and after each 'failing' query I wait 2 seconds before retrying.
Is there a better way to wait for the receipt as long as the transaction is valid (without using a loop)? And do I need a timeout? Is there a request limit on how often I can execute that query?
At the moment, I'm using a loop to query for the result. If the query fails, I wait two seconds before trying again.