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

refactor!: use submit_and_await_commit API #1187

Merged
merged 19 commits into from
Jan 8, 2024

Conversation

iqdecay
Copy link
Contributor

@iqdecay iqdecay commented Nov 5, 2023

Closes #1180, #1128.
This PR uses the correct API for sending a transaction and ensuring that we wait for the commit of the transaction before returning.
This is needed because otherwise there might be a disconnect between submitting the transaction and awaiting for its commit, if it is done using the two separate APIs as before.
Further work will be needed as part of #1188

BREAKING CHANGE:

  • send_transaction_and_await_commit function now returns a TxStatus instead of TxId.

Copy link
Contributor

@MujkicA MujkicA left a comment

Choose a reason for hiding this comment

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

Could you elaborate a bit more on what problem inspired this change?
Why are we deleting await_transaction_commit? Then we are no longer able to call submit and await at a later point in the code.

@iqdecay iqdecay force-pushed the iqdecay/refactor-await-commit-api branch from 4d6d4fd to 23787c9 Compare November 6, 2023 17:53
@iqdecay
Copy link
Contributor Author

iqdecay commented Nov 6, 2023

@MujkicA I added some more context and re-added the removed function.

Base automatically changed from iqdecay/refactor-tx-status to master November 8, 2023 14:42
Br1ght0ne
Br1ght0ne previously approved these changes Dec 19, 2023
@iqdecay iqdecay changed the title refactor: use submit_and_await_commit API refactor!: use submit_and_await_commit API Dec 19, 2023
Copy link
Contributor

@hal3e hal3e left a comment

Choose a reason for hiding this comment

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

Great works! Thanks!

@iqdecay
Copy link
Contributor Author

iqdecay commented Jan 6, 2024

@FuelLabs/sdk-rust can we please move this forward

@iqdecay iqdecay merged commit 638a548 into master Jan 8, 2024
40 checks passed
@iqdecay iqdecay deleted the iqdecay/refactor-await-commit-api branch January 8, 2024 10:04
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.

refactor: use the submit_and_await_commit API
6 participants