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

Unsubscribe from subscribed address when transaction sending fails #2480

Merged
merged 2 commits into from
May 21, 2024

Conversation

sisou
Copy link
Member

@sisou sisou commented May 17, 2024

What's in this pull request?

Unsubscribe from a previously subscribed address during tx-sending in the web-client. The address is subscribed to to get notified of the inclusion of the transaction in the chain, then unsubscribed at the end of the function. However, send_transaction itself can fail, in which case the subscription was not cleaned up.

@hrxi This currently is simply a duplication of the code found at the end of the function. Do you know a better way that only defines the logic once and then calls it from both places? Or another means to achieve this same result?

This fixes #2456.

Pull request checklist

  • All tests pass. The project builds and runs.
  • I have resolved any merge conflicts.
  • I have resolved all clippy and rustfmt warnings.

@sisou sisou requested a review from hrxi May 17, 2024 12:19
@sisou sisou self-assigned this May 17, 2024
Copy link
Member

@jsdanielh jsdanielh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsdanielh jsdanielh merged commit ad7ec90 into albatross May 21, 2024
6 checks passed
@jsdanielh jsdanielh deleted the soeren/2456 branch May 21, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sending a transaction in web-client may not always unsubscribe from address
5 participants