Skip to content

chore: test smart transactions controller preview#43610

Draft
cryptodev-2s wants to merge 1 commit into
mainfrom
chore/test-smart-transactions-controller-preview
Draft

chore: test smart transactions controller preview#43610
cryptodev-2s wants to merge 1 commit into
mainfrom
chore/test-smart-transactions-controller-preview

Conversation

@cryptodev-2s

Copy link
Copy Markdown
Contributor

Description

Overrides @metamask/smart-transactions-controller to the preview package @metamask-previews/smart-transactions-controller@24.2.1-preview-742bf0b2a.

This mirrors the MetaMask Mobile preview-package test and updates the generated LavaMoat policies for the dependency path changes.

Changelog

CHANGELOG entry: null

Related issues

Refs: N/A - preview package validation only.

Manual testing steps

  1. Build and run the extension from this branch.
  2. Load the built extension in a browser.
  3. Unlock or create a wallet.
  4. Verify the extension starts normally and wallet home loads without controller initialization errors.
  5. If the environment has Smart Transactions enabled, start an eligible transaction flow and verify the flow reaches the review screen without Smart Transactions Controller errors.

Pre-merge author checklist

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.

@github-actions

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.

@mm-token-exchange-service mm-token-exchange-service Bot added the team-core-platform Core Platform team label Jun 16, 2026
@mm-token-exchange-service

mm-token-exchange-service Bot commented Jun 16, 2026

Copy link
Copy Markdown

✨ Files requiring CODEOWNER review ✨

📜 @MetaMask/policy-reviewers (8 files, +8 -136)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +1 -33
      • 📁 experimental/
        • 📄 policy.json +1 -33
      • 📁 flask/
        • 📄 policy.json +1 -33
      • 📁 main/
        • 📄 policy.json +1 -33
    • 📁 webpack/
      • 📁 mv2/
        • 📁 beta/
          • 📄 policy.json +1 -1
        • 📁 experimental/
          • 📄 policy.json +1 -1
        • 📁 flask/
          • 📄 policy.json +1 -1
        • 📁 main/
          • 📄 policy.json +1 -1

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.

@socket-security

socket-security Bot commented Jun 16, 2026

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
Updated@​metamask/​smart-transactions-controller@​24.2.0 ⏵ 24.2.1-preview-742bf0b2a00000

View full report

@mm-token-exchange-service

Copy link
Copy Markdown
Builds ready [3d0a72a]
Deprecated Browserify fallback builds
⚡ Performance Benchmarks (Total: 🟢 13 pass · 🟡 11 warn · 🔴 1 fail)

Baseline (latest main): f2d6439 | Date: 6/16/2026 | Pipeline: 27618197795 | Baseline logs

Metricschrome-webpackfirefox-webpack
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 1 failure)

Interaction Benchmarks · Samples: 5
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • bridgeUserActions/longTaskTotalDuration: +17%
  • bridgeUserActions/longTaskMaxDuration: +15%
  • bridgeUserActions/tbt: +33%
  • bridgeUserActions/inp: +27%
  • loadNewAccount/load_new_account: +581%
  • loadNewAccount/total: +581%
  • loadNewAccount/lcp: +1174%
  • confirmTx/confirm_tx: +15%
  • confirmTx/longTaskCount: -100%
  • confirmTx/longTaskTotalDuration: -100%
  • confirmTx/longTaskMaxDuration: -100%
  • confirmTx/tbt: -100%
  • confirmTx/total: +15%
  • confirmTx/fcp: -47%
  • confirmTx/lcp: +1231%
  • bridgeUserActions/bridge_load_page: +73%
  • bridgeUserActions/bridge_load_asset_picker: +71%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: +26%
  • bridgeUserActions/inp: -15%
  • bridgeUserActions/lcp: +1201%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 1.8s
  • 🟡 loadNewAccount/FCP: p75 1.9s
  • 🟡 bridgeUserActions/FCP: p75 1.8s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
startupPowerUserHome
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/cls: -100%
  • startupPowerUserHome/setupStore: +10%
  • startupPowerUserHome/numNetworkReqs: +15%
  • startupStandardHome/initialActions: +11%
  • startupStandardHome/inp: -23%
  • startupPowerUserHome/setupStore: -27%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🔴 startupPowerUserHome/INP: p75 552ms
  • 🟡 startupPowerUserHome/LCP: p75 3.1s
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total
assetDetails
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
importSrpHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
sendTransactions
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
swap
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/pwFormToMetricsScreen: +10%
  • onboardingImportWallet/metricsToWalletReadyScreen: +16%
  • onboardingImportWallet/doneButtonToHomeScreen: -88%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -52%
  • onboardingImportWallet/longTaskCount: -76%
  • onboardingImportWallet/longTaskTotalDuration: -93%
  • onboardingImportWallet/longTaskMaxDuration: -91%
  • onboardingImportWallet/tbt: -98%
  • onboardingImportWallet/total: -86%
  • onboardingNewWallet/doneButtonToAssetList: -34%
  • onboardingNewWallet/longTaskCount: -55%
  • onboardingNewWallet/longTaskTotalDuration: -61%
  • onboardingNewWallet/longTaskMaxDuration: -22%
  • onboardingNewWallet/tbt: -41%
  • onboardingNewWallet/total: -28%
  • solanaAssetDetails/assetClickToPriceChart: -62%
  • solanaAssetDetails/longTaskCount: -100%
  • solanaAssetDetails/longTaskTotalDuration: -100%
  • solanaAssetDetails/longTaskMaxDuration: -100%
  • solanaAssetDetails/tbt: -100%
  • solanaAssetDetails/total: -62%
  • solanaAssetDetails/inp: +14%
  • solanaAssetDetails/lcp: -10%
  • solanaAssetDetails/cls: -91%
  • importSrpHome/loginToHomeScreen: -11%
  • importSrpHome/openAccountMenuAfterLogin: +60%
  • importSrpHome/homeAfterImportWithNewWallet: -38%
  • importSrpHome/longTaskCount: -31%
  • importSrpHome/longTaskTotalDuration: -33%
  • importSrpHome/longTaskMaxDuration: -15%
  • importSrpHome/tbt: -29%
  • importSrpHome/total: -32%
  • importSrpHome/inp: -33%
  • sendTransactions/openSendPageFromHome: +42%
  • sendTransactions/selectTokenToSendFormLoaded: +21%
  • sendTransactions/reviewTransactionToConfirmationPage: -14%
  • sendTransactions/total: -13%
  • sendTransactions/inp: -15%
  • sendTransactions/fcp: +11%
  • sendTransactions/cls: -89%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/FCP: p75 2.0s
  • 🟡 sendTransactions/INP: p75 216ms
  • 🟡 sendTransactions/FCP: p75 1.9s
  • 🟡 assetDetails/FCP: p75 1.9s
  • 🟡 solanaAssetDetails/FCP: p75 1.9s
  • 🟡 importSrpHome/FCP: p75 1.9s
  • 🟡 sendTransactions/FCP: p75 1.9s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 59 Bytes (0%)
  • ui: 2.47 KiB (0.02%)
  • common: -239.48 KiB (-1.77%)

amitabh94 pushed a commit to amitabh94/core that referenced this pull request Jun 16, 2026
)

## Explanation

**Phase C PR MetaMask#12** of the [package migration process
guide](https://github.com/MetaMask/core/blob/main/docs/processes/package-migration-process-guide.md)
for
[`@metamask/smart-transactions-controller`](https://github.com/MetaMask/core/tree/main/packages/smart-transactions-controller).

Final move from `merged-packages/` into `packages/` plus the wiring
needed for `yarn install`, `yarn workspace ... test`, `yarn
constraints`, and the README/CHANGELOG checks to pass.

### Changes

- **Moved**: `git mv merged-packages/smart-transactions-controller
packages/` (renames only, no content drift). Removed the now-empty
`merged-packages/` directory.
- **Root tsconfigs**: added `./packages/smart-transactions-controller`
and `./packages/smart-transactions-controller/tsconfig.build.json`
references (alphabetical).
- **Root `README.md`**: ran `yarn readme-content:update` to add the
package to the package list + the mermaid dependency graph.
- **`yarn.config.cjs`**: added `@metamask/smart-transactions-controller`
to the license-exception list. It carries a ConsenSys non-commercial
`LICENSE` we did not relicense to MIT.
- **`.github/CODEOWNERS`** + **`teams.json`**: registered ownership to
`@MetaMask/transactions` / `team-transactions` (added a new
"Transactions Team" section in `CODEOWNERS`).
- **`packages/smart-transactions-controller/package.json`**:
- Aligned `nock` from `^14.0.0-beta.7` → `^13.3.1` to match the rest of
the monorepo. The v14-beta mock incompatibilities we saw in the
source-repo context don't surface under the monorepo's
`jest.config.packages.js` setup — 196/196 tests pass on nock 13.
- Dropped 4 unused deps flagged by knip: `@ethereumjs/tx`,
`@ethereumjs/util`, `fast-json-patch` (runtime),
`@metamask/gas-fee-controller` (dev).
- `yarn constraints --fix` stripped the trailing period from
`description`.
- **`packages/smart-transactions-controller/jest.config.js`**: dropped
the `setupFiles: ['./setupJest.js']` override and the `testTimeout:
2500` override. Core's root `tests/setup.ts` already clears Node's
native fetch and loads `isomorphic-fetch` (a superset of what
`setupJest.js` did); Jest's default 5000ms timeout is more generous than
the previous 2500ms. Coverage thresholds kept at the source-repo's
originals (95% achieved comfortably exceeds them).
- **`packages/smart-transactions-controller/setupJest.js`**: deleted
(now redundant).
- **`packages/smart-transactions-controller/CHANGELOG.md`**: documented
the migration + dropped deps under `[Unreleased]` and added the
`[Unreleased]` link reference required by `auto-changelog` v6.
- **Formatting**: applied oxfmt fixes to `package.json` +
`SmartTransactionsController.test.ts`.

### Testing

- Preview Test in Mobile:
MetaMask/metamask-mobile#31804
- Preview Test in Extension:
MetaMask/metamask-extension#43610

### Verification

- ✅ `yarn install`
- ✅ `yarn workspace @metamask/smart-transactions-controller test` —
196/196 pass; ~95% coverage
- ✅ `yarn workspace @metamask/smart-transactions-controller build`
- ✅ `yarn constraints`
- ✅ `yarn lint:teams`
- ✅ `yarn knip --dependencies` (clean for this package)
- ✅ `yarn workspace @metamask/smart-transactions-controller
changelog:validate`
- ✅ `yarn lint:misc` (oxfmt)
- ✅ `yarn readme-content:check`

### Downstream

No core package currently depends on
`@metamask/smart-transactions-controller`, so this PR contains no
downstream version-bump or CHANGELOG updates.

## References

- Prior steps: history merge (MetaMask#9130), CHANGELOG reset (MetaMask#9131), strip
files (MetaMask#9132), replace configs (MetaMask#9134), align deps + scripts (MetaMask#9136),
README update (MetaMask#9138)
- Migration process:
[`docs/processes/package-migration-process-guide.md`](https://github.com/MetaMask/core/blob/main/docs/processes/package-migration-process-guide.md)

## 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](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant