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

chore!: remove deprecated submitAndAwait operation #3548

Merged
merged 6 commits into from
Jan 6, 2025

Conversation

nedsalk
Copy link
Contributor

@nedsalk nedsalk commented Jan 6, 2025

Summary

This PR removes the submitAndAwait operation which was previously deprecated.

Breaking Changes

  • submitAndAwait operation was removed

After being deprecated since #3101, we have removed this operation altogether. Please use the submitAndAwaitStatus method instead which gives the same results as submitAndAwait. If you are interested in the deprecation/removal reasons, please refer to FuelLabs/fuel-core#2108.

// before
const response = await provider.operations.submitAndAwait(txRequest);
// after
const response = await provider.operations.submitAndAwaitStatus(txRequest);

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Jan 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 4:31pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 4:31pm
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 4:31pm

Copy link
Member

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

Please could you add a change to the breaking change notes, detailing what should be used now

@nedsalk nedsalk requested a review from danielbate January 6, 2025 13:26
Copy link
Member

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

For breaking change notes, could we have something like this so it's more inline with other breaking change notes?

Breaking Changes

Provider.operations.submitAndAwait has been removed, since being deprecated in #3101. Please now use Provider.operations.submitAndAwaitStatus to perform this functionality. If you are interested in the deprecation/removal reasons, please refer to FuelLabs/fuel-core#2108.

// before
const response = await provider.operations.submitAndAwait(txRequest);

// after
const response = await provider.operations.submitAndAwaitStatus(txRequest);

danielbate
danielbate previously approved these changes Jan 6, 2025
arboleya
arboleya previously approved these changes Jan 6, 2025
Torres-ssf
Torres-ssf previously approved these changes Jan 6, 2025
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Coverage Report:

Lines Branches Functions Statements
77.82%(+0.01%) 70.58%(+0.11%) 75.37%(-0.05%) 77.78%(+0.01%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/account.ts 78.23%
(-0.59%)
63.88%
(+0.37%)
80%
(+0%)
78.03%
(-0.58%)
🔴 packages/account/src/providers/provider.ts 68.55%
(-0.47%)
56.56%
(-0.58%)
70.21%
(-0.75%)
68.28%
(-0.45%)
🔴 packages/account/src/providers/generated/operations.ts 94.7%
(-0.07%)
100%
(+0%)
83.67%
(-0.33%)
95.12%
(-0.06%)
🔴 packages/account/src/providers/transaction-response/transaction-response.ts 76.4%
(-0.87%)
65.45%
(+0%)
93.75%
(+0%)
76.4%
(-0.87%)
🔴 packages/fuels/src/cli/commands/deploy/createWallet.ts 92.3%
(+0.64%)
75%
(+0%)
100%
(+0%)
92.3%
(+0.64%)

Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

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

LGTM but question - should the method be removed from the fuel-core-schema.graphql as well? I understand the method still exists in fuel-core but if it's no longer used on our side I wonder why it ought to be included here.

@petertonysmith94
Copy link
Contributor

LGTM but question - should the method be removed from the fuel-core-schema.graphql as well? I understand the method still exists in fuel-core but if it's no longer used on our side I wonder why it ought to be included here.

The schema (fuel-core-schema.graphql) reflects the schema from fuel-core and therefore shouldn't be removed.

@nedsalk nedsalk merged commit d404734 into master Jan 6, 2025
24 checks passed
@nedsalk nedsalk deleted the ns/chore/remove-submit-and-await branch January 6, 2025 17:33
@maschad
Copy link
Member

maschad commented Jan 6, 2025

@petertonysmith94 I understand that aspect - the question was more in relation to why do we need to have an identical file on our side if we are not using all the methods, particularly if we are removing one.

@petertonysmith94
Copy link
Contributor

petertonysmith94 commented Jan 7, 2025

@maschad I believe that codegen requires a schema to validate the operations/documents against - to ensure the operations are a subset of the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove submitAndAwait from provider
6 participants