Skip to content

[SDK] Add ability to specify timeout for transactions wait #3716

@dnechay

Description

@dnechay

Is your feature request related to a problem? Please describe.
Sometimes transactions can stuck in the pool and wait operation keeps open connection until apps is shut down. In order to gracefully handle timeout-cancellations, would be good to have an ability to pass timeout param to tx.wait (docs ref).

Describe the solution you'd like
Accept timeout option (same format as in ethers - milliseconds) in method options where we pass gas price, nonce, and etc. Also consider option of adding confirms params as well

Describe alternatives you've considered
Using Promise.race - not enough because it just throws, original wait promise still runs in the background.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions