Skip to content

Comments

chore: add optional abtest property event for swap events#8007

Merged
sahar-fehri merged 5 commits intomainfrom
fix/add-optional-abtest-context-for-tookendetails
Feb 25, 2026
Merged

chore: add optional abtest property event for swap events#8007
sahar-fehri merged 5 commits intomainfrom
fix/add-optional-abtest-context-for-tookendetails

Conversation

@sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Feb 20, 2026

Explanation

Adds optional ab_tests context to swap/bridge metrics events, allowing attribution to specific A/B test experiments

References

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
Primarily adds optional metadata fields and propagation for analytics; behavioral changes are limited to event payload composition and should not affect transaction execution.

Overview
Adds optional A/B test attribution to Unified Swap/Bridge metrics by introducing ab_tests on bridge-controller event context/types and an abTests field on bridge-status-controller history items.

Bridge Status flows (startPollingForBridgeTxStatus, submitTx, submitIntent) now accept/propagate abTests, persist it in txHistory, and #trackUnifiedSwapBridgeEvent resolves ab_tests from either the call-site properties or stored history before emitting events; getPreConfirmationPropertiesFromQuote also conditionally includes ab_tests. Includes a unit test to verify ab_tests is pulled from history for tracked failure events, and updates both packages’ changelogs.

Written by Cursor Bugbot for commit 5d63280. This will update automatically on new commits. Configure here.

@sahar-fehri sahar-fehri marked this pull request as ready for review February 24, 2026 13:22
@sahar-fehri sahar-fehri requested review from a team as code owners February 24, 2026 13:22
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@sahar-fehri sahar-fehri added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 539de20 Feb 25, 2026
310 checks passed
@sahar-fehri sahar-fehri deleted the fix/add-optional-abtest-context-for-tookendetails branch February 25, 2026 15:04
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.

3 participants