chore: bump compliance controller to 2.1.0#30906
Conversation
|
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| * Manual mock for @metamask/compliance-controller. | ||
| * | ||
| * Reflects the v2.0.0 public API surface: the bulk-fetch blocklist pattern. | ||
| * Reflects the v2.1.0 public API surface: the bulk-fetch blocklist pattern. |
There was a problem hiding this comment.
This comment is nice but I feel like it's something that could easily be missed and cause confusion, I'd opt to omit the version number entirely here
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
Description
This PR updates mobile to consume
@metamask/compliance-controller@2.1.0and wires the mobile compliance setup to use the configured Compliance API URL.The reason for this change is to bring mobile onto the latest compliance-controller release that supports explicit API URL configuration and shared wallet-blocked selectors. That support is needed for the broader compliance work so mobile can resolve compliance checks through build configuration instead of relying only on the controller package’s environment fallback.
The solution bumps the compliance-controller dependency, passes
COMPLIANCE_API_URLintoComplianceService, adds the URL to mobile build configuration, and updates the mobile selector wrapper to use the core batch blocked-wallet selector. Tests were updated to cover the configured API URL wiring and the EVM case-insensitive address matching behavior from the released controller package.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Changes which compliance API URL the wallet uses and how blocked-address lookups behave (including EVM case-insensitivity), which can affect send/receive gating if misconfigured.
Overview
Upgrades
@metamask/compliance-controllerfrom 2.0.0 to 2.1.0 and threads a configurable compliance backend URL through mobile builds.ComplianceServicenow receivesapiUrlfromCOMPLIANCE_API_URL(with existing prod/devenvunchanged). That variable is added to.js.env.example, sharedbuilds.ymlpublic envs,jest.config.js, andapply-build-config.jsso CI and local builds hit the production compliance host by default.The Redux
selectAreAnyWalletsBlockedwrapper delegates to the package’scoreSelectAreAnyWalletsBlockedinstead of loopingselectIsWalletBlockedlocally, aligning multichain “any blocked” checks with controller logic (including case-insensitive EVM matching). Tests and the Jest manual mock were updated forapiUrlwiring and address matching behavior.Reviewed by Cursor Bugbot for commit a6652a8. Bugbot is set up for automated code reviews on this repo. Configure here.