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

sdk/js: Replace deprecated function with signSendAndConfirmTransaction #3239

Merged
merged 3 commits into from
Mar 14, 2024

Conversation

hmzakhalid
Copy link
Contributor

@hmzakhalid hmzakhalid commented Jul 26, 2023

Summary

This pull request addresses the deprecation of the sendAndConfirmTransactionsWithRetry function in the postVaaWithRetry method. This function was replaced with the new signSendAndConfirmTransaction function as per the recent updates in the library. The retries are done with the ConfirmOption and handled internally in the Solana library.

Changes

The main changes involve replacing the deprecated sendAndConfirmTransactionsWithRetry function with the signSendAndConfirmTransaction function in the postVaaWithRetry method. The signSendAndConfirmTransaction function handles each transaction individually, so the code has been adjusted to process each transaction in a loop.

This change was required because sendAndConfirmTransactionsWithRetry was marked as deprecated in the library, and the library maintainers recommended using signSendAndConfirmTransaction instead.

barnjamin
barnjamin previously approved these changes Jul 27, 2023
@barnjamin
Copy link
Contributor

@kev1n-peters or @nonergodic can you plz take a peek at this one?

@nonergodic
Copy link
Collaborator

Given that the max retries can now be specified via options, isn't the right call here to deprecate postVaaWithRetry entirely? (And let's face it, it should have never existed in the first place.)

@hmzakhalid
Copy link
Contributor Author

Hey @nonergodic, I'm in complete favor of deprecating the postVaaWithRetry function, as the functionality is identical to postVaa, except for the additional asyncVerifySignatures parameter.

Would this deprecation message suffice?

/**
 * @deprecated Please use {@link postVaa} instead, which allows
 * retries and commitment to be configured in {@link ConfirmOptions}.
*/

@nonergodic
Copy link
Collaborator

Looks good to me 👍

@hmzakhalid
Copy link
Contributor Author

@nonergodic Perfect! I've committed the suggested changes.

@evan-gray evan-gray merged commit 098e75d into wormhole-foundation:main Mar 14, 2024
22 checks passed
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.

None yet

4 participants