-
Notifications
You must be signed in to change notification settings - Fork 243
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
feat: use sendTransaction for OIS #2555
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
@@ -195,13 +195,15 @@ const useApiContext = ( | |||
publicKey: wallet.publicKey, | |||
signAllTransactions: wallet.signAllTransactions, | |||
signTransaction: wallet.signTransaction, |
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.
signTransaction
and signAllTransactions
are not used anymore?
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.
Yes they are not used afaik, but I thought it's better to keep them.
@@ -20,5 +18,7 @@ export const sendTransaction = async ( | |||
{}, | |||
); | |||
|
|||
return sendTransactions(transactions, connection, wallet); | |||
for (const transaction of transactions) { | |||
await wallet.sendTransaction(transaction.tx, connection); |
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.
remind me why the interface needs a connection?
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.
not sure tbh, my guess is that some wallets will use this connection to send the tx instead of their own.
Summary
Use wallet send transaction for OIS instead of sign and send
Rationale
For multisig wallets it takes time for everyone to sign and causes block hash to expire.
How has this been tested?