Skip to content

[pull] main from MetaMask:main#667

Merged
pull[bot] merged 7 commits into
Reality2byte:mainfrom
MetaMask:main
Jun 19, 2026
Merged

[pull] main from MetaMask:main#667
pull[bot] merged 7 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull

@pull pull Bot commented Jun 19, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jiexi and others added 7 commits June 19, 2026 08:36
## Explanation

Reassigns Wallet Integrations owned files to Core platform

## References

Fixes: https://consensyssoftware.atlassian.net/browse/WAPI-1546

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] 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)
- [x] 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
## Summary

Adds the optional `isDeprecated` constructor callback to
`TokensController`, following the same pattern introduced in
[#9182](#9182) for
`CurrencyRateController`,
[#9044](#9044) for
`MultichainAssetsRatesController` and `MultichainBalancesController`,
[#9033](#9033) for
`TokenRatesController`, `TokenBalancesController`, and
`AccountTrackerController`, and
[#8945](#8945) for
`TokenListController`.

When `isDeprecated()` returns `true`:

- **TokensController** — no network requests are issued and no token
list enrichment runs; `allTokens`, `allIgnoredTokens`, and
`allDetectedTokens` are reset to `{}` at construction and at every entry
point (`addToken`, `addTokens`, `ignoreTokens`, `addDetectedTokens`,
`updateTokenType`, `watchAsset`, `clearIgnoredTokens`,
`NetworkController:stateChange`, and
`KeyringController:accountRemoved`).

The callback is re-evaluated on each entry point so deprecation can be
toggled at runtime without reconstructing the controller — intended for
use when `AssetsController` supersedes this controller.

Ticket: https://consensyssoftware.atlassian.net/browse/ASSETS-3330

## Test plan

- [x] Added unit tests for construction, runtime toggles, and no-fetch
guarantees
- [x] `yarn workspace @metamask/assets-controllers run jest
--no-coverage src/TokensController.test.ts`

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Clears all persisted token maps when deprecated, which can briefly
empty the UI if the flag is misconfigured; behavior is opt-in and
aligned with existing controller deprecation patterns.
> 
> **Overview**
> Adds an optional **`isDeprecated`** constructor callback to
**`TokensController`**, matching the deprecation pattern used on other
assets controllers when **`AssetsController`** takes over.
> 
> When **`isDeprecated()`** is true, init skips token-list enrichment,
public methods and messenger-driven handlers no-op (or
**`updateTokenType`** throws), and **`#enforceDisabledState`** wipes
**`allTokens`**, **`allIgnoredTokens`**, and **`allDetectedTokens`** so
persisted token lists cannot linger. The flag is re-checked on each
entry point so deprecation can flip at runtime without recreating the
controller.
> 
> Changelog and broad unit tests cover construction, runtime toggles,
and network/event entry points.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0d406f6. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## Explanation

Minor update to assets-controllers (109.2.0)
<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

## References
https://consensyssoftware.atlassian.net/browse/ASSETS-3328
https://consensyssoftware.atlassian.net/browse/ASSETS-3330
<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] 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


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Release-only version and changelog/lockfile updates; behavioral
changes are additive opt-in `isDeprecated` flags documented in 109.2.0,
not new logic in this diff.
> 
> **Overview**
> **Monorepo release 1056.0.0** that cuts
**`@metamask/assets-controllers` at 109.2.0** and updates dependents to
depend on `^109.2.0`.
> 
> The diff is **versioning and dependency wiring only** (root
`package.json`, `assets-controllers` / `assets-controller` /
`bridge-controller` / `transaction-pay-controller` `package.json` files,
changelogs, and `yarn.lock`). No controller source changes appear in
this PR.
> 
> Per the **109.2.0** changelog entry being released, consumers pick up
optional **`isDeprecated`** constructor hooks on **`TokensController`**,
**`CurrencyRateController`**, **`MultichainAssetsRatesController`**, and
**`MultichainBalancesController`**—when deprecated, those controllers
skip network/Snap work and clear relevant state at construction and on
each public entry point (re-evaluated at runtime).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
debcdc7. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## Explanation

Provider RPC failures currently preserve only the original provider
message, which can make transaction and MetaMask Pay errors difficult to
group or diagnose when the same message can come from different chains,
endpoints, or RPC methods.

This PR prefixes errors thrown from the TransactionController and
TransactionPayController provider utilities with the chain ID, endpoint
type, and RPC method before rethrowing the original error object. The
original error metadata is preserved, while the message now follows the
format `RPC <chainId> <Infura|Custom> <method>: <message>`.

Both controller packages are updated so errors are consistent across
transaction submission paths and Pay-specific live-balance/RPC paths.

## References

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] 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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Error message shape changes (replacing the prior `RPC submit:`
prefix), which may affect client UX or metrics that match on the old
strings; logic is localized to provider error handling.
> 
> **Overview**
> RPC failures from **TransactionController** and
**TransactionPayController** now carry **chain ID**, **Infura vs Custom
endpoint**, and **RPC method** in the error message, using the form `RPC
<chainId> <Infura|Custom> <method>: <message>`.
> 
> Context is applied in shared **`rpcRequest`** helpers: on
`provider.request` failure, the **original error** is rethrown after its
`message` is updated (preferring nested `data.message` when present).
**`#publishTransaction`** no longer wraps publish failures in a new `RPC
submit:` error, so **`eth_sendRawTransaction`** and other RPC paths
share the same formatting.
> 
> Tests and changelogs are updated for the new messages and behavior.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
409124f. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…#9201)

## Explanation

Relay and Fiat submit paths should never silently complete without the
transaction hash they are expected to produce. This PR makes those paths
fail closed with explicit errors when required child transactions are
not collected, a final submitted transaction has no hash, or Fiat is
selected without an executable quote.

The publish-hook fallback remains available for non-Fiat no-quote routes
that intentionally skip Pay. Fiat is treated as an explicit Pay route,
so a selected Fiat payment method with no quote now throws instead of
allowing raw fallback.

As supporting cleanup, submit errors now preserve the original `Error`
object and stack while adding source prefixes at the Pay, Relay, Fiat,
Post-Ramp, Direct mUSD, and vault batch-submission boundaries.

## References

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] 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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes core MetaMask Pay publish and submit behavior for Relay/Fiat
paths, including a new hard failure when Fiat is selected without
quotes; incorrect edge-case handling could block legitimate payments.
> 
> **Overview**
> Relay and Fiat submit paths now **fail closed** when they would
previously return without a required transaction hash—empty quote lists,
no collected child transactions, or confirmed txs missing a hash all
throw explicit errors. The publish hook still skips Pay when there are
no quotes for non-Fiat flows, but **Fiat with a selected payment method
and no quote** now errors (`Fiat: Missing quote`) instead of falling
through.
> 
> Submit failures use a shared **`prefixError`** helper so layered
messages (`MetaMask Pay:`, `Relay:`, `Fiat:`, `Post-Ramp:`, `Direct
mUSD:`, `Vault:`, `Execute:`) are applied **in place** on the original
`Error` (stack preserved); `RelayStrategy` no longer adds an extra
submit wrapper. Direct mUSD post-ramp submission is refactored through
`submitDirectMusdAfterFiatCompletion`, and order asset validation moves
to shared `validateOrderAsset` in fiat utils.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f7e9093. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Release of:

- `@metamask/transaction-controller` (minor): 68.0.1 → 68.1.0
- `@metamask/transaction-pay-controller` (minor): 23.12.0 → 23.13.0

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Wide bump of transaction-controller across payment, bridge, and
signing-adjacent packages; 68.1.0 changes error shaping on the tx/RPC
path, which is critical even if submission logic is unchanged.
> 
> **Overview**
> **Monorepo release 1057.0.0** cuts new versions of
`@metamask/transaction-controller` (**68.0.1 → 68.1.0**) and
`@metamask/transaction-pay-controller` (**23.12.0 → 23.13.0**), with
changelog links and `yarn.lock` updated across the tree.
> 
> The shipped behavior in this release (documented in those changelogs,
not in this diff) is **richer provider errors**: RPC method, chain ID,
and endpoint type are attached to transaction and MetaMask Pay provider
failures, including raw tx submission errors
([#9144](#9144)). Pay’s **23.13.0**
entry also records that alignment plus routine dependency bumps (e.g.
`transaction-controller`, `assets-controllers`, `ramps-controller`).
> 
> This PR **propagates** `@metamask/transaction-controller` to
**^68.1.0** in many workspace packages (bridge, assets, EIP-5792
middleware, phishing, shield, smart-transactions, subscription,
user-operation, etc.) and updates their **Unreleased** changelog lines
to cite [#9203](#9203).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
4d6e602. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## Explanation
When the upgrade process throws an error, include the step where the
error occurred in what is thrown. This will allow client applications to
report errors more effectively.
<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] 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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Only changes error propagation on the failure path; upgrade sequencing
and success behavior are unchanged.
> 
> **Overview**
> **`upgradeAccount`** now catches failures from any upgrade step and
re-throws them as **`MoneyAccountUpgradeStepError`**, with **`step`**
set to that step’s `name` and the original value kept on **`cause`**.
The public message still includes the underlying text (from
`Error.message` or `String(cause)`).
> 
> The package adds **`MoneyAccountUpgradeStepError`**,
**`isMoneyAccountUpgradeStepError`** (structural guard for bundled
apps), unit/integration tests, changelog notes, and updated JSDoc for
the messenger action type.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d66b594. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Jun 19, 2026
@pull pull Bot added the ⤵️ pull label Jun 19, 2026
@pull pull Bot merged commit d562139 into Reality2byte:main Jun 19, 2026
0 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants