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

Add send w/ spinner and options to rust client #1926

Merged

Conversation

stegaBOB
Copy link
Contributor

Currently, it is very clunky to take a builder and convert that to a send w/ options. Sending with options is useful in order to be able to customize the transaction config in order to turn off preflight checks (which make it easier to debug errors).

This change adds a single function to the RequestBuilder struct, send_with_spinner_and_config (name is placeholder at the moment. Feel free to change it if its too long). Tests passing and tested it locally and everything still works.

@@ -556,6 +553,29 @@ impl<'a> RequestBuilder<'a> {
.send_and_confirm_transaction(&tx)
.map_err(Into::into)
}

pub fn send_with_spinner_and_config(self, config: RpcSendTransactionConfig) -> Result<Signature, ClientError> {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a changelog entry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@armaniferrante armaniferrante merged commit b993854 into coral-xyz:master May 29, 2022
@armaniferrante
Copy link
Member

Thank you!

@stegaBOB stegaBOB deleted the stegaBOB/feat/client-send-options branch October 12, 2022 16:52
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.

2 participants