-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Fix: update hooks to use core transaction types #7647
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
[SDK] Fix: update hooks to use core transaction types #7647
Conversation
🦋 Changeset detectedLatest commit: 2c983ee The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe changes update the type signatures of several React transaction hooks in the "thirdweb" package to use the core transaction types, specifically switching from Changes
Sequence Diagram(s)sequenceDiagram
participant ReactComponent
participant useSendTransaction
participant CoreTransaction
ReactComponent->>useSendTransaction: Call mutateAsync(transaction)
useSendTransaction->>CoreTransaction: Send transaction (type: SendTransactionOptions["transaction"])
CoreTransaction-->>useSendTransaction: Return receipt or error
useSendTransaction-->>ReactComponent: Return result
sequenceDiagram
participant ReactComponent
participant useSendBatchTransaction
participant CoreTransaction
ReactComponent->>useSendBatchTransaction: Call mutateAsync([transaction1, transaction2, ...])
useSendBatchTransaction->>CoreTransaction: Send batch ([SendTransactionOptions["transaction"]])
CoreTransaction-->>useSendBatchTransaction: Return receipts or error
useSendBatchTransaction-->>ReactComponent: Return result
sequenceDiagram
participant ReactComponent
participant useSendAndConfirmTransaction
participant CoreTransaction
ReactComponent->>useSendAndConfirmTransaction: Call mutateAsync(transaction)
useSendAndConfirmTransaction->>CoreTransaction: Send and confirm (type: SendTransactionOptions["transaction"])
CoreTransaction-->>useSendAndConfirmTransaction: Return receipt or error
useSendAndConfirmTransaction-->>ReactComponent: Return result
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@alecananian is attempting to deploy a commit to the thirdweb Team on Vercel. A member of the Team first needs to authorize it. |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
joaquim-verges
left a comment
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.
Good catch! thank you for this. merging
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (66.66%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## main #7647 +/- ##
===========================================
- Coverage 56.43% 36.07% -20.37%
===========================================
Files 908 901 -7
Lines 58193 57696 -497
Branches 4226 2379 -1847
===========================================
- Hits 32840 20812 -12028
- Misses 25244 36807 +11563
+ Partials 109 77 -32
🚀 New features to boost your workflow:
|
Fixes #7646
See above issue for error explanation - it boils down to type mismatches between
PreparedTransactionandPreparedTransaction<any>PR-Codex overview
This PR updates the transaction handling in the
thirdwebpackage by transitioning from usingPreparedTransactiontoSendTransactionOptions["transaction"]across various hooks and actions, enhancing type safety and consistency in transaction processing.Detailed summary
SendBatchTransactionOptionsto useSendTransactionOptions["transaction"]instead ofPreparedTransaction[].useSendBatchTransactionto acceptSendTransactionOptions["transaction"][].useSendAndConfirmTransactionto useSendTransactionOptions["transaction"]instead ofPreparedTransaction.useSendTransactionCoreto acceptSendTransactionOptions["transaction"]instead ofPreparedTransaction.Summary by CodeRabbit
New Features
Documentation