Skip to content

fix: include quote slippage value in MixPanel event properties - #9786

Open
micaelae wants to merge 7 commits into
mainfrom
swaps4446-fix-post-submit-slippage
Open

fix: include quote slippage value in MixPanel event properties#9786
micaelae wants to merge 7 commits into
mainfrom
swaps4446-fix-post-submit-slippage

Conversation

@micaelae

@micaelae micaelae commented Aug 4, 2026

Copy link
Copy Markdown
Member

Explanation

Saves the QuoteResponse["quote"]["slippage"] value in the txHistory to populate the Submitted, Failed and Completed MixPanel events

References

Fixes https://consensyssoftware.atlassian.net/browse/SWAPS-4446

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Small analytics/history field change with a safe fallback; no transaction submission or auth logic is modified.

Overview
Bridge transaction history now records slippage from the quote instead of always storing 0, so post-submission Unified SwapBridge analytics (Submitted, Failed, Completed) can report the real slippage_limit / related MixPanel fields.

On SubmitStep.AddHistoryItem, slippagePercentage is set from quoteResponse.quote.slippage, with 0 when the field is missing. Tests and snapshots were updated to expect a non-zero slippage when the mock quote includes it.

Reviewed by Cursor Bugbot for commit 35071be. Bugbot is set up for automated code reviews on this repo. Configure here.

@micaelae
micaelae marked this pull request as ready for review August 4, 2026 23:44
@micaelae
micaelae requested review from a team as code owners August 4, 2026 23:44
@micaelae
micaelae enabled auto-merge August 4, 2026 23:44
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.

1 participant