Skip to content

test(money): check the publish hook's deposit delegation against the MPC 2FA whitelist - #38944

Closed
tylerc-consensys wants to merge 1 commit into
mainfrom
test/money-mfa-whitelist-ci
Closed

tylerc-consensys wants to merge 1 commit into
mainfrom
test/money-mfa-whitelist-ci

Conversation

@tylerc-consensys

@tylerc-consensys tylerc-consensys commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a unit test that builds the vault deposit delegation with mobile's own caveat code (getDelegationCaveats, as the gasless 7702 publish hook does) and checks it against the Money MPC 2-step verification whitelist with getMfaRequirement. A caveat change on mobile that the whitelist doesn't accept now fails CI instead of showing up as an unexpected 2FA prompt.

  • MPC_MFA_WHITELIST_CONFIG lives in app/core/MpcMoneyKeyring/mpc-mfa-whitelist-config.ts, so the MPC keyring builder and this test share it.
  • Adds @metamask/money-account-mfa-whitelist and transpiles it in Jest (ESM-only).

The case with the Sentinel relay Redeemer caveat fails on whitelist 0.2.0 and passes with core#11310. Merge after the version with that fix is released and pinned here.

Changelog

CHANGELOG entry: null

Related issues

Refs: MetaMask/core#11310

Manual testing steps

N/A: unit test only.

Screenshots/Recordings

N/A: unit test only.

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@tylerc-consensys tylerc-consensys self-assigned this Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions Bot added the size-M label Nov 5, 2026
@metamask-ci metamask-ci Bot added the team-onboarding Onboarding team label Nov 5, 2026
…MPC 2FA whitelist

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tylerc-consensys
tylerc-consensys force-pushed the test/money-mfa-whitelist-ci branch from c64d497 to 8e2543f Compare November 5, 2026 08:49
@tylerc-consensys
tylerc-consensys changed the base branch from feat/money-mfa-mpc-account to main November 5, 2026 08:49
@metamask-ci

metamask-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've tested on Android"). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​metamask/​money-account-mfa-whitelist@​0.2.0991009594100

View full report

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant