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: transaction revert error #2896

Merged
merged 8 commits into from
Aug 12, 2024
Merged

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Aug 7, 2024

Summary

  • Within our transaction flow, we listen to the statusChange subscription. Once a change of status occurs, we perform a getTransactionWithReceipts query.
  • The statusChange subscription was posting a SuccessStatus, but the sub-sequential call to the getTransactionWithReceipts query returned a SubmittedStatus, which the SDK interprets as an erroneous condition.
  • This change adds an expected status guard to the getTransactionWithReceipts, to ensure that the response aligns with the subscription result.

Checklist

  • I addedtests to prove my changes
  • I updated — all the necessary docs
  • I reviewed — the entire PR myself, using the GitHub UI
  • I described — all breaking changes and the Migration Guide

@petertonysmith94 petertonysmith94 changed the title fix: transaction waitForStatusChange expects the status received fr… fix: transaction revert error Aug 8, 2024
Torres-ssf
Torres-ssf previously approved these changes Aug 8, 2024
danielbate
danielbate previously approved these changes Aug 9, 2024
nedsalk
nedsalk previously approved these changes Aug 9, 2024
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
79.74%(-0.02%) 72.06%(+0%) 77.71%(+0%) 79.88%(-0.02%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/providers/transaction-response/transaction-response.ts 73.01%
(-2.85%)
60.71%
(+2.38%)
90%
(+0%)
73.01%
(-2.85%)

@petertonysmith94 petertonysmith94 merged commit c7104da into master Aug 12, 2024
20 checks passed
@petertonysmith94 petertonysmith94 deleted the ps/bug/transaction-revert-error branch August 12, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants