tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
440 stars 277 forks source link

Add the ability to set a custom timeout for send method with shouldPollResponse parameter #368

Closed Natashkinsasha closed 1 year ago

Natashkinsasha commented 1 year ago

Currently, when calling the send method with the shouldPollResponse parameter set to true, the default timeout for waiting for the transaction to be executed is 60 seconds. However, this timeout may be insufficient for busy networks where transaction confirmation may take longer.

It would be great to have the ability to set a custom timeout for the send method with the shouldPollResponse parameter, allowing developers to adjust the timeout according to their needs.

Adding this feature would improve the user experience for developers using your library and make it more adaptable to different network conditions.

Thank you for considering this feature request.

unicornonea commented 1 year ago

Thank you for your suggestion, we will support it in next version. And now if the default timeout is insufficient , you could check the transaction result bytronWeb.trx.getTransactionInfo(txID).