feat: init the new assets controller package under FF#39917
Conversation
|
@metamaskbot update-policies |
|
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.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
✨ Files requiring CODEOWNER review ✨📜 @MetaMask/policy-reviewers (20 files, +708 -0)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff 👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes |
app/scripts/controller-init/messengers/assets/assets-controller-messenger.ts
Outdated
Show resolved
Hide resolved
app/scripts/controller-init/messengers/assets/assets-controller-messenger.ts
Outdated
Show resolved
Hide resolved
|
@metamaskbot update-policies |
|
Policy update failed. You can review the logs or retry the policy update here |
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff 👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes |
Builds ready [9b130a6]
UI Startup Metrics (1348 ± 102 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [bc34b60]
UI Startup Metrics (1415 ± 114 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
naugtur
left a comment
There was a problem hiding this comment.
Approving policy and verrides on behalf of @MetaMask/policy-reviewers
| "nanoid": true | ||
| } | ||
| }, | ||
| "@metamask/assets-controller": { |
There was a problem hiding this comment.
we're introducing a new package here
| "@metamask/snaps-utils>validate-npm-package-name": true | ||
| } | ||
| }, | ||
| "@metamask/assets-controller>@metamask/snaps-utils": { |
There was a problem hiding this comment.
snaps-utils version has changed
| "browserify>browser-resolve": true | ||
| } | ||
| }, | ||
| "@metamask/core-backend>@tanstack/query-core": { |
There was a problem hiding this comment.
we use tanstack query on the new package
| "define": true | ||
| } | ||
| }, | ||
| "@metamask/assets-controller>bignumber.js": { |
There was a problem hiding this comment.
we use bignumber js on the new package
LavaMoat policy.json differences (beta / flask / experimental vs main)TL;DR: The differences between variant What this PR changes
Why variant policy.json files differ
Summary
So when the bot says “policy.json changes differ from main,” that refers to the existing difference between each variant’s generated policy and main’s, not to new inconsistencies introduced here. |
Kriys94
left a comment
There was a problem hiding this comment.
I have few small changes in mind but I will tackle them in another PR
hjetpoluru
left a comment
There was a problem hiding this comment.
Hi @salimtb, could you address the comments from the CursorBot and it could break some other tests.
test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json
Outdated
Show resolved
Hide resolved
naugtur
left a comment
There was a problem hiding this comment.
re-approving the same policy diff on behalf of @MetaMask/policy-reviewers
Builds ready [0ee26f6]
UI Startup Metrics (1382 ± 92 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
init the new assets controller package under a feature flag
Changelog
CHANGELOG entry: init the new assets controller under a feature flag
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches core controller initialization wiring and introduces new privileged messenger/action/event delegations plus new LavaMoat allowances; while feature-flagged, misconfiguration could impact startup or asset data fetching/auth token usage.
Overview
Introduces a new
AssetsControllerInitthat constructs@metamask/assets-controllerwith a cachedcreateApiPlatformClient, token-detection preference wiring, and anisEnabledgate driven by theassetsUnifyStateremote feature flag/version.Wires the controller into modular controller initialization and the controller messenger registry, and conditionally initializes/exposes
AssetsControllerfrommetamask-controller.jsonly when the flag is enabled. Adds new messenger plumbing + unit tests for both init/messenger behavior, updates controller type/state unions, and expands LavaMoat policies pluspackage.json/yarn.lockto include@metamask/assets-controller(and updated@metamask/core-backenddeps such as@tanstack/query-core).Written by Cursor Bugbot for commit 0ee26f6. This will update automatically on new commits. Configure here.