)
## 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
Description
Overrides
@metamask/smart-transactions-controllerto 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
Pre-merge author checklist
Pre-merge reviewer checklist