Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web3.js: Make confirmTransaction cancellable #25304

Closed
steveluscher opened this issue May 17, 2022 · 1 comment · Fixed by #29057
Closed

web3.js: Make confirmTransaction cancellable #25304

steveluscher opened this issue May 17, 2022 · 1 comment · Fixed by #29057
Labels
javascript Pull requests that update Javascript code web3.js Related to the JavaScript client

Comments

@steveluscher
Copy link
Contributor

Problem

We're about to add a really long running confirmation strategy for transactions in #25303. It's possible for those never to expire and also never be confirmed.

You could conceive of an app that subscribes to this confirmation, but then stops caring if the user navigates away or otherwise becomes disinterested in the status of that transaction. We need to offer a way to signal to confirmTransaction to stop working.

Proposed Solution

  1. Make confirmTransaction take an AbortController as an argument
  2. Stop work in that function when the abort signal is triggered on it.
@steveluscher steveluscher added the javascript Pull requests that update Javascript code label May 17, 2022
@steveluscher
Copy link
Contributor Author

cc/ @lorisleiva for interest's sake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code web3.js Related to the JavaScript client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant