Skip to content

chore: event properties for swap withdraw and deposit - #11677

Open
micaelae wants to merge 6 commits into
mainfrom
swaps5257-money-metrics
Open

micaelae wants to merge 6 commits into
mainfrom
swaps5257-money-metrics

Conversation

@micaelae

@micaelae micaelae commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Explanation

Populates the money_account_action and failure_phase MixPanel event properties

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
Changes are limited to analytics payloads and failure-phase labeling; no auth, signing, or submission logic changes beyond attaching richer event properties on existing failure paths.

Overview
Adds shared MoneyAccountAction (withdraw / deposit) and FailurePhase values withdraw_execution and deposit_execution in bridge-controller, and threads optional money_account_action through Unified SwapBridge event property types and quote helper options.

Bridge-status-controller now emits money_account_action on Completed/Failed (and related) events when history includes deposit or withdraw tx meta, aligns Operation with the shared action constants, and classifies failures for MM Pay steps (deposit/withdraw handlers and next-action submit errors) with the new failure phases instead of generic source/destination execution. Failure helpers take history/deposit/withdraw context rather than hashes alone, and tests/snapshots assert the new analytics fields.

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

@micaelae
micaelae requested a review from a team as a code owner November 20, 2026 01:13
@micaelae
micaelae deployed to default-branch November 20, 2026 01:13 — with GitHub Actions Active
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🛑 Files requiring codeowner review

To merge this PR, you'll need to get approvals from the following owners.

@MetaMask/swaps-engineers (16 files)
  • packages/bridge-controller/CHANGELOG.md
  • packages/bridge-controller/src/index.ts
  • packages/bridge-controller/src/utils/metrics/constants.ts
  • packages/bridge-controller/src/utils/metrics/properties.ts
  • packages/bridge-controller/src/utils/metrics/types.ts
  • packages/bridge-status-controller/CHANGELOG.md
  • packages/bridge-status-controller/src/__snapshots__/bridge-status-controller.deposit.test.ts.snap
  • packages/bridge-status-controller/src/bridge-status-controller.deposit.test.ts
  • packages/bridge-status-controller/src/bridge-status-controller.ts
  • packages/bridge-status-controller/src/bridge-status-controller.withdraw.test.ts
  • packages/bridge-status-controller/src/index.ts
  • packages/bridge-status-controller/src/types.ts
  • packages/bridge-status-controller/src/utils/history.ts
  • packages/bridge-status-controller/src/utils/metrics.test.ts
  • packages/bridge-status-controller/src/utils/metrics.ts
  • packages/bridge-status-controller/src/utils/subscriptions.ts

ℹ️ Files co-owned by @MetaMask/core-platform (expand for more)

[!NOTE]
For convenience in maintaining this repo, @MetaMask/core-platform co-owns
the following files. It is not required to seek approval from
@MetaMask/core-platform to change these files. This section is purely
informational.

  • packages/bridge-controller/CHANGELOG.md
  • packages/bridge-status-controller/CHANGELOG.md

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 using default effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5bffc8b. Configure here.

@micaelae
micaelae requested a review from a team as a code owner November 20, 2026 01:43

This branch was successfully deployed

1 active (outdated) deployment
default-branch — 5bffc8bb Deployed Nov 20, 2026 by micaelae via Determine whether this PR is a release PR #7411
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