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

fix: reject subscription promise on disconnect #479

Merged
merged 4 commits into from
Feb 24, 2022
Merged

Conversation

rflechtner
Copy link
Contributor

@rflechtner rflechtner commented Feb 22, 2022

fixes https://github.com/KILTprotocol/ticket/issues/1835

To avoid tx status & event subscription to go stale or miss important updates (like finalisation), this makes sure that they are rejected on disconnect. Users would then have to go and check on chain if their transactions were successful by checking the desired effects.

How to test:

Using a test chain, make a transaction, submit it via the Blockchain helpers and interrupt the connection after receiving the isReady status update (e.g. by switching wifi off).

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@rflechtner rflechtner requested a review from tjwelde February 22, 2022 19:38
Copy link
Contributor

@tjwelde tjwelde left a comment

Choose a reason for hiding this comment

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

ah interesting way of handling it. I like it.

@ntn-x2 ntn-x2 merged commit c27b036 into develop Feb 24, 2022
@ntn-x2 ntn-x2 deleted the rf-fail-on-disconnect branch February 24, 2022 11:51
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.

3 participants