-
Notifications
You must be signed in to change notification settings - Fork 919
Export a non-confirming transaction sender factory #2132
Export a non-confirming transaction sender factory #2132
Conversation
config: Omit<Parameters<typeof sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT>[0], 'rpc' | 'transaction'>, | ||
) => Promise<void>; | ||
|
||
export function sendTransactionWithoutConfirmingFactory({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without confirming? Without confirmation?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this stack!
2666449
to
f0334d1
Compare
2650adb
to
af40783
Compare
Merge activity
|
f0334d1
to
621bd0d
Compare
af40783
to
3650aad
Compare
🎉 This PR is included in version 1.90.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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. |
Summary
Folks can use this to create a transaction sender that does not confirm the transaction.
Closes #2121