feat(STX-575): add has_sufficient_gas_for_quote to quote received event#8895
Open
rarquevaux wants to merge 1 commit into
Open
feat(STX-575): add has_sufficient_gas_for_quote to quote received event#8895rarquevaux wants to merge 1 commit into
rarquevaux wants to merge 1 commit into
Conversation
ae0535b to
5ee2ada
Compare
5ee2ada to
11b7aa6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Add optional
has_sufficient_gas_for_quoteproperty toQuotesReceivedevent andgetQuotesReceivedPropertiesutility to allow clients to pass whether the user has sufficient gas to submit the quote.Context: https://docs.google.com/document/d/1EFG4E-5_U8DPAcxWFtNbemgB4e5e22pXxIFx5Pf37n8/edit?tab=t.0
This property will allow us to measure the perception of the user that they have enough native assets to cover the gas, but are presented incorrectly with a gasless swap quote
Why not using the warnings as a warning is added when the user has insufficient gas for quote. The warning is not emitted in the case of a
gasIncludedquote. Adding the warning when it is not shown to the user for the quote would break the semantic of the existing warning property.References
Checklist
Note
Low Risk
Backward-compatible optional analytics field and helper parameter; no swap/bridge execution or auth logic changes.
Overview
Adds an optional
has_sufficient_gas_for_quotefield to unified swap/bridgeQuotesReceivedanalytics so clients can report whether the user has enough native gas to submit the active quote—separate from existingwarnings, which do not cover gasless (gasIncluded) quotes cleanly.getQuotesReceivedPropertiesgains a sixth optional argument; the property is included in the payload only when that argument is notundefined(same pattern asusd_balance_source).RequiredEventContextFromClientforQuotesReceivedis updated accordingly, and the change is noted inCHANGELOG.md.Reviewed by Cursor Bugbot for commit 11b7aa6. Bugbot is set up for automated code reviews on this repo. Configure here.