Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Export a non-confirming transaction sender factory #2132

Merged

Conversation

steveluscher
Copy link
Contributor

Summary

Folks can use this to create a transaction sender that does not confirm the transaction.

Closes #2121

config: Omit<Parameters<typeof sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT>[0], 'rpc' | 'transaction'>,
) => Promise<void>;

export function sendTransactionWithoutConfirmingFactory({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without confirming? Without confirmation?

Copy link
Contributor

Choose a reason for hiding this comment

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

WithoutConfirming makes more sense to me. WithoutConfirmation could imply there's no confirmation that the transaction was sent.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on WithoutConfirming.

rpc,
}: SendTransactionWithoutConfirmingFactoryConfig): SendTransactionWithoutConfirmingFunction {
return async function sendTransactionWithoutConfirming(transaction, config) {
await sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm seeing how long I can go without returning the signature from any of the send* methods. I want people to start to get the signature ahead of time using getSignatureFromTransaction() so that they can start to make use of it in their apps sooner.

Copy link
Contributor

Choose a reason for hiding this comment

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

The harbinger of JavaScript-Solana pain.

Copy link
Contributor

Choose a reason for hiding this comment

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

It took me ages to realise that you don't need to send a transaction to get its signature just because of the way functions are structured on the old web3.js so I think this is a great change to educate people about that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

💯

rpc,
}: SendTransactionWithoutConfirmingFactoryConfig): SendTransactionWithoutConfirmingFunction {
return async function sendTransactionWithoutConfirming(transaction, config) {
await sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT({
Copy link
Contributor

Choose a reason for hiding this comment

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

The harbinger of JavaScript-Solana pain.

config: Omit<Parameters<typeof sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT>[0], 'rpc' | 'transaction'>,
) => Promise<void>;

export function sendTransactionWithoutConfirmingFactory({
Copy link
Contributor

Choose a reason for hiding this comment

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

WithoutConfirming makes more sense to me. WithoutConfirmation could imply there's no confirmation that the transaction was sent.

Copy link
Contributor

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

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

Love this stack!

@steveluscher steveluscher force-pushed the 02-17-Evict_all_transaction_confirmation_methods_into_solana/transaction-confirmation_ branch from 2666449 to f0334d1 Compare February 20, 2024 22:27
@steveluscher steveluscher force-pushed the 02-17-Export_a_non-confirming_transaction_sender_factory branch from 2650adb to af40783 Compare February 20, 2024 22:27
@steveluscher
Copy link
Contributor Author

steveluscher commented Feb 20, 2024

Merge activity

  • Feb 20, 2:56 PM PST: @steveluscher started a stack merge that includes this pull request via Graphite.
  • Feb 20, 3:02 PM PST: Graphite rebased this pull request as part of a merge.
  • Feb 20, 3:03 PM PST: @steveluscher merged this pull request with Graphite.

@steveluscher steveluscher force-pushed the 02-17-Evict_all_transaction_confirmation_methods_into_solana/transaction-confirmation_ branch from f0334d1 to 621bd0d Compare February 20, 2024 22:59
Base automatically changed from 02-17-Evict_all_transaction_confirmation_methods_into_solana/transaction-confirmation_ to master February 20, 2024 23:01
@steveluscher steveluscher force-pushed the 02-17-Export_a_non-confirming_transaction_sender_factory branch from af40783 to 3650aad Compare February 20, 2024 23:01
@steveluscher steveluscher merged commit 1532546 into master Feb 20, 2024
6 checks passed
@steveluscher steveluscher deleted the 02-17-Export_a_non-confirming_transaction_sender_factory branch February 20, 2024 23:03
Copy link
Contributor

github-actions bot commented Mar 2, 2024

🎉 This PR is included in version 1.90.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[experimental] Export confirming and non-confirming transaction senders
3 participants