-
Notifications
You must be signed in to change notification settings - Fork 557
[SDK] Handle sponsored gas on TransactionWidget #7437
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] Handle sponsored gas on TransactionWidget #7437
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis update introduces wallet-aware sponsored gas handling in the transaction details logic. The Changes
Sequence Diagram(s)sequenceDiagram
participant UI_Component as UI Component (e.g., TransactionPayment, PaymentOverview)
participant Wallet as Wallet
participant useTransactionDetails as useTransactionDetails Hook
participant GasLogic as Gas Cost Logic
UI_Component->>Wallet: Retrieve active wallet (useActiveWallet or from paymentMethod)
UI_Component->>useTransactionDetails: Call with transaction + wallet
useTransactionDetails->>Wallet: Check if sponsored transactions are enabled
alt Sponsored Transactions Enabled
useTransactionDetails->>GasLogic: Set gas cost to 0
else Not Sponsored
useTransactionDetails->>GasLogic: Fetch actual gas cost
end
useTransactionDetails-->>UI_Component: Return transaction details (with correct gas cost)
Possibly related PRs
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
🪧 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 (
|
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
6cb6656
to
9a6164e
Compare
🦋 Changeset detectedLatest commit: 9a6164e 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 |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (16.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 #7437 +/- ##
==========================================
- Coverage 51.96% 51.96% -0.01%
==========================================
Files 947 947
Lines 63809 63820 +11
Branches 4216 4214 -2
==========================================
+ Hits 33161 33163 +2
- Misses 30542 30551 +9
Partials 106 106
🚀 New features to boost your workflow:
|
PR-Codex overview
This PR focuses on enhancing the
TransactionWidget
to handle sponsored gas transactions, improving the user experience in payment processing.Detailed summary
paymentMethod
prop toTransactionOverViewCompact
.wallet
frompaymentMethod
inuseTransactionDetails
.useActiveWallet
inTransactionPayment
.UseTransactionDetailsOptions
to includewallet
.useTransactionDetails
.Summary by CodeRabbit
New Features
Bug Fixes