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

feat: use sendTransaction for OIS #2555

Merged
merged 5 commits into from
Apr 4, 2025
Merged

feat: use sendTransaction for OIS #2555

merged 5 commits into from
Apr 4, 2025

Conversation

keyvankhademi
Copy link
Contributor

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?

  • Current tests cover my changes
  • Added new tests
  • [ x] Manually tested the code

@keyvankhademi keyvankhademi requested a review from a team as a code owner April 3, 2025 22:26
Copy link

vercel bot commented Apr 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2025 10:50pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2025 10:50pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2025 10:50pm
component-library ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2025 10:50pm
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2025 10:50pm
proposals ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2025 10:50pm

Copy link

@Copilot Copilot AI left a 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,
Copy link
Contributor

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?

Copy link
Contributor Author

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@keyvankhademi keyvankhademi merged commit 64e9eb3 into main Apr 4, 2025
9 checks passed
@keyvankhademi keyvankhademi deleted the ois-send-transaction branch April 4, 2025 18:01
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.

3 participants