-
-
Notifications
You must be signed in to change notification settings - Fork 252
chore: add is gasFeeSponsored field in transaction batch params #7064
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
Changes from all commits
349fcd5
c682f66
c307071
0a5a3ad
faf89cc
f42af53
0995577
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -401,6 +401,7 @@ async function addTransactionBatchWith7702( | |
| const { result } = await addTransaction(txParams, { | ||
| batchId, | ||
| isGasFeeIncluded: userRequest.isGasFeeIncluded, | ||
| isGasFeeSponsored: userRequest.isGasFeeSponsored, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only for EIP-7702 flow, do we also want want to pass it for the hook fallback via STX or sequentially?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The requirement is 7702 support from the chain to activate sponsorship. If 7702 is not supported by the chain then sponsorship cannot happen.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Current gas fees sponsored use case is only for EIP-7702 delegation flow.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor, is it worth asserting this is passed in one of the existing unit tests? |
||
| nestedTransactions, | ||
| networkClientId, | ||
| origin, | ||
|
|
||
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.
Bug: Gas Sponsorship Not Reflected in Quote Response
The
gasSponsoredproperty is destructured fromquoteResponse.quotebut it's not included in thequoteResponseparameter type definition. Looking at the context, the function signature showsquoteResponse: Omit<QuoteResponse, 'approval' | 'trade'> & Partial<QuoteMetadata>, butgasSponsoredis not part of thequoteobject's known structure based on the imports from@metamask/bridge-controller. This could result ingasSponsoredbeingundefinedandisGasFeeSponsoredalways beingfalse, even when gas is actually sponsored.