feat(network-enablement-controller): enable in network enablement [STELLAR]#8832
Merged
Conversation
…work-enablement-controller
4 tasks
salimtb
approved these changes
Jun 24, 2026
Prithpal-Sooriya
approved these changes
Jun 24, 2026
Prithpal-Sooriya
approved these changes
Jun 24, 2026
pull Bot
pushed a commit
to Reality2byte/core
that referenced
this pull request
Jun 25, 2026
## Explanation
This PR adds Stellar as a supported non-EVM network for the bridge/swap
flow, spanning two packages: `@metamask/bridge-controller` (quote
handling and trade construction) and
`@metamask/bridge-status-controller` (transaction submission and status
tracking).
Until now the bridge/swap stack recognized EVM chains plus Bitcoin,
Solana, and Tron as non-EVM chains. Stellar was not a recognized chain,
so quotes, trade-data extraction, and snap-based submission had no path
for it. This change introduces the chain, its native asset, and the
Stellar-specific trade-data shape so that Stellar quotes can be fetched,
parsed, and submitted end to end.
**`@metamask/bridge-controller`**
- Register Stellar mainnet (`stellar:pubnet`, `XlmScope.Pubnet`) as a
supported chain and include Stellar pubnet/testnet in `isNonEvmChainId`;
add `isStellarChainId` and `ChainId.STELLAR`.
- Add native XLM metadata: `CURRENCY_SYMBOLS.XLM`, the
`XLM_SWAPS_TOKEN_OBJECT` ("Stellar Lumens"), and the `slip44:148` native
asset id.
- Add the `StellarTradeDataSchema` / `StellarTradeData` type and
`isStellarTrade`; extend `extractTradeData` to read a Stellar
transaction envelope (XDR) from either a `{ xdrBase64 }` or `{ xdr }`
object, mirroring how the other non-EVM trade types are handled.
- Align CAIP / decimal formatting with the Bridge API for Stellar in the
CAIP formatters.
- Export `StellarTradeData`, `isStellarChainId`, and `isStellarTrade`
from the package root.
**`@metamask/bridge-status-controller`**
- Thread `StellarTradeData` through the non-EVM submit strategies so
Stellar trades can be submitted alongside Bitcoin/Tron.
- Include the source and destination asset IDs (CAIP-19) in the snap
client transaction request. These are used to populate Stellar trade
metadata for transaction history. Because the request shape is shared
across non-EVM submissions, the asset IDs now also appear for the
existing Solana paths (reflected in the updated submit snapshots) — no
behavioral change beyond the added metadata fields.
### Notes for reviewers
- The `QuoteResponse`/`QuoteResponseV1` union now includes
`StellarTradeData` so Stellar quotes type-check through the existing
quote-response path.
- No public API is removed or renamed by this PR; the new exports are
additive.
## References
Part of the Stellar network enablement across `@metamask/core`:
- Related to MetaMask#8830 (multichain-account-service: `XlmAccountProvider`)
- Related to MetaMask#8831 (multichain-network-controller: Stellar network
scopes)
- Related to MetaMask#8832 (network-enablement-controller: enable Stellar)
## 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 the non-EVM transaction submission path and snap request shape
for bridge trades; scope is additive but touches fund-movement plumbing.
>
> **Overview**
> Adds **Stellar** as a supported non-EVM network for unified
bridge/swap flows in `@metamask/bridge-controller` and
`@metamask/bridge-status-controller`.
>
> In **bridge-controller**, Stellar pubnet is registered as an allowed
bridge chain with native **XLM** metadata (`slip44:148`),
`ChainId.STELLAR`, and `isStellarChainId` / `isNonEvmChainId` updates.
Quote validation and types gain **`StellarTradeData`** (`xdrBase64` or
`xdr`); `extractTradeData` and CAIP/decimal formatters map Stellar IDs
for Bridge API requests. New helpers are exported from the package
entry.
>
> In **bridge-status-controller**, non-EVM submit validation accepts
Stellar trades, and **`signAndSendTransaction`** snap requests can
include **`sourceAssetId`** / **`destAssetId`** from the quote (for
Stellar history metadata; Solana submit snapshots pick up the same
optional fields). Trade type guards in `trade-utils` switch to
`hasOwnProp` instead of `in` checks.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
9a3ffc6. 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: jeremytsng <jeremy.tsang-ext@consensys.net>
Co-authored-by: Julink <julien.fontanel@consensys.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
References
Checklist
Note
Medium Risk
Changes default persisted enablement state and popular-network behavior for wallets that load Stellar from multichain config; scope is limited to network-enablement logic and tests.
Overview
Adds Stellar to
@metamask/network-enablement-controllerusing the same pattern as Bitcoin, Solana, and Tron.Default
enabledNetworkMapnow includesKnownCaipNamespace.Stellarwith pubnet enabled and testnet disabled.enableAllPopularNetworks()turns on Stellar pubnet when that chain exists inMultichainNetworkController.listPopularMultichainNetworks()andlistPopularNetworks()treatXlmScope.Pubnetas a popular multichain mainnet when configured.Messenger action JSDoc and tests are updated for the new namespace and expected counts (e.g. seven popular networks in the default fixture).
network-enablement-controllerandassets-controllerschangelogs document the feature and a@metamask/utilsbump respectively.Reviewed by Cursor Bugbot for commit 8abb845. Bugbot is set up for automated code reviews on this repo. Configure here.