Skip to content

feat(tron): classify swap, bridge, and send transactions in analytics - #434

Merged
Battambang merged 4 commits into
mainfrom
feat/tron-flow-classification-analytics
Oct 12, 2026
Merged

Battambang merged 4 commits into
mainfrom
feat/tron-flow-classification-analytics

Conversation

@Battambang

Copy link
Copy Markdown
Contributor

Explanation

Current state

The Tron Snap reports transaction_type on its transaction lifecycle analytics events, but the value is derived only from the raw Tron contract type. Every TriggerSmartContract — which covers unified swap, unified bridge, and TRC20 token sends — therefore reports unknown. As a result the three non-EVM user flows (unified swap/bridge, unified send, dApp send) cannot be told apart from the Snap payload alone.

Solution

Add resolveTransactionType, which classifies a transaction in two ways:

  • When the unified swap/bridge flow passes options.sourceAssetId and options.destAssetId, their CAIP-2 chains are compared: a cross-chain pair reports bridgeSend, a same-chain pair reports swap. This mirrors the Stellar Snap.
  • Otherwise (unified send, dApp transactions) it falls back to the contract type and, for smart-contract calls, the function selector: TRC20 transfer (0xa9059cbb) reports send, TRC20 approve (0x095ea7b3) reports tokenApprove, and anything else stays unknown.

The optional sourceAssetId/destAssetId fields are added to the signAndSendTransaction options struct, and the resolver is used at all three emission sites (client request, keyring sign, and unified send). The classification is resolved at submit time and already carried through the TrackTransaction background event, so Transaction Finalized reports the same value.

Non-obvious points

  • The new options are optional, so existing callers keep validating; the Snap is backward compatible with clients that do not send asset ids yet.
  • This also fixes a latent gap: a unified TRC20 send previously reported unknown and now reports send.
  • The core bridge-status-controller only starts sending the asset ids for Tron trades after this Snap ships, so this change must land first.

References

  • Related to the Non-EVM flow analytics work for Tron, Solana, Bitcoin, and Stellar.

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@Battambang
Battambang force-pushed the feat/tron-flow-classification-analytics branch from 3d867df to aa682db Compare October 9, 2026 14:41
@Battambang
Battambang requested a balanced review from Copilot October 9, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The unified TRC20 send path lacks a service-level regression test, and the changelog omits part of the shipped behavior.

2 open findings
What changed in this PR

Adds Tron analytics classification for swaps, bridges, TRC20 sends, and approvals.

Changes:

  • Adds transaction classification using asset chains and TRC20 selectors.
  • Propagates classifications through submission, confirmation, and finalization events.
  • Extends request validation and analytics tests.
File Description
packages/​tron-wallet-snap/​src/​utils/​transactionType.ts Adds transaction-type resolution.
packages/​tron-wallet-snap/​src/​utils/​transactionType.test.ts Tests resolver classifications.
packages/​tron-wallet-snap/​src/​services/​send/​SendService.ts Classifies unified sends.
packages/​tron-wallet-snap/​src/​services/​confirmation/​ConfirmationHandler.ts Classifies keyring transactions.
packages/​tron-wallet-snap/​src/​services/​confirmation/​ConfirmationHandler.test.ts Tests dApp classifications.
packages/​tron-wallet-snap/​src/​handlers/​cronjob/​cronjob.test.tsx Tests finalized classification propagation.
packages/​tron-wallet-snap/​src/​handlers/​clientRequest/​validation.ts Accepts optional asset IDs.
packages/​tron-wallet-snap/​src/​handlers/​clientRequest/​clientRequest.ts Classifies swaps and bridges.
packages/​tron-wallet-snap/​src/​handlers/​clientRequest/​clientRequest.test.ts Tests submission classifications.
packages/​tron-wallet-snap/​CHANGELOG.md Documents analytics changes.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/tron-wallet-snap/src/services/send/SendService.ts
Comment thread packages/tron-wallet-snap/CHANGELOG.md Outdated
@Battambang
Battambang force-pushed the feat/tron-flow-classification-analytics branch 2 times, most recently from c78d685 to f85e565 Compare October 9, 2026 15:11
@Battambang
Battambang requested a balanced review from Copilot October 9, 2026 15:17
@Battambang

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The classification logic is consistent across analytics paths and is covered by focused tests.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@3.1.0-preview-f85e565
@metamask-previews/snap-networks-utils@1.0.0-preview-f85e565
@metamask-previews/solana-wallet-snap@7.0.0-preview-f85e565
@metamask-previews/stellar-wallet-snap@1.1.1-preview-f85e565
@metamask-previews/tron-wallet-snap@4.0.0-preview-f85e565

@Battambang
Battambang marked this pull request as ready for review October 9, 2026 15:26
@Battambang
Battambang requested review from a team as code owners October 9, 2026 15:26
@Battambang
Battambang deployed to default-branch October 9, 2026 15:26 — with GitHub Actions Active
@Battambang
Battambang force-pushed the feat/tron-flow-classification-analytics branch from e065093 to 62e7473 Compare October 12, 2026 09:16
Add resolveTransactionType, which classifies a transaction from the
unified swap/bridge sourceAssetId/destAssetId options (cross-chain ->
bridgeSend, same-chain -> swap) and otherwise falls back to the contract
type and TRC20 call selector (transfer -> send, approve -> tokenApprove).

Accept the optional sourceAssetId/destAssetId on signAndSendTransaction
and use the resolver at the client request, keyring sign, and unified
send emission sites so the classification is carried from submit through
Transaction Finalized. This also fixes TRC20 sends, which previously
reported unknown.
@Battambang
Battambang force-pushed the feat/tron-flow-classification-analytics branch from 62e7473 to 0bc67e1 Compare October 12, 2026 09:21
@Battambang
Battambang requested a balanced review from Copilot October 12, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The classification logic is consistently integrated and comprehensively tested across all analytics paths.

0 open findings

🧠 Review effort: Balanced

@Battambang

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@3.1.0-preview-0bc67e1
@metamask-previews/snap-networks-utils@1.0.0-preview-0bc67e1
@metamask-previews/solana-wallet-snap@7.0.0-preview-0bc67e1
@metamask-previews/stellar-wallet-snap@1.1.1-preview-0bc67e1
@metamask-previews/tron-wallet-snap@4.0.0-preview-0bc67e1

return undefined;
}

return callData.slice(0, 8).toLowerCase();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure the callData does not come with a 0x prefix ? Because if it does we won't get the right data selector, maybe we could strip it first to make sure ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Battambang
Battambang requested a review from Julink-eth October 12, 2026 12:10
@Battambang

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@3.1.0-preview-d52c8001
@metamask-previews/snap-networks-utils@1.0.0-preview-d52c8001
@metamask-previews/solana-wallet-snap@7.0.0-preview-d52c8001
@metamask-previews/stellar-wallet-snap@1.1.1-preview-d52c8001
@metamask-previews/tron-wallet-snap@4.0.0-preview-d52c8001

@Battambang
Battambang added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 47158da Oct 12, 2026
56 checks passed
@Battambang
Battambang deleted the feat/tron-flow-classification-analytics branch October 12, 2026 12:17
runway-github Bot added a commit to MetaMask/metamask-extension that referenced this pull request Oct 15, 2026
## **Description**

This pull request updates several dependencies in the `package.json`
file to use newer versions of key MetaMask Snap packages. These updates
ensure compatibility with the latest features and bug fixes provided by
those packages.
It also refines how swap activity rows are displayed and tested,
especially for incomplete swaps with zero source amounts.

**Dependency updates:**

* Upgraded `@metamask/solana-wallet-snap` from version `^7.0.0` to
`^7.1.0`.
* Upgraded `@metamask/tron-wallet-snap` from version `^4.0.0` to
`^4.1.0`.

**Swap Activity Row Display Logic:**

- Updated `useActivityRowContent` to omit both primary and secondary
amounts for incomplete swaps where the source amount is zero, preventing
display of irrelevant or misleading values.
[[1]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dR146-R156)
[[2]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dL161-R177)

**Testing Enhancements:**

- Added tests to verify that amounts are omitted for incomplete swaps
with a zero source amount, and that formatting functions are not called
in this case.
- Improved tests to check that formatted amounts are correctly used for
complete swaps and that the correct props are passed to display
components.
[[1]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R137-R139)
[[2]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R206-R207)
[[3]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R216-R218)

**E2E Test Adjustments:**

- Refactored Solana swap E2E tests to use more accurate transaction
status and amount checks, aligning with the new display logic.
[[1]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L579-R580)
[[2]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L626-R628)

## @metamask/solana-wallet-snap 7.1.0

### Added
- Emit `transaction_type` on the transaction lifecycle events.
([#401](MetaMask/internal-snaps#401))

### Changed
- `getAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's Solana RPC clients instead of
returning persisted state.
([#432](MetaMask/internal-snaps#432))
- Classify `transaction_type` for the unified swap/bridge flow with the
shared `resolveFlowTransactionType` utility and the new optional
`sourceAssetId`/`destAssetId` request options, carried through to
`Transaction Finalized`.
([#439](MetaMask/internal-snaps#439))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#384](MetaMask/internal-snaps#384))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#409](MetaMask/internal-snaps#409))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of no banner
- Render the confirmation network fee with the shared `Asset` component
from `@metamask/snap-networks-utils`
([#427](MetaMask/internal-snaps#427))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#436](MetaMask/internal-snaps#436))
- The sign message and sign-in screens now have the same spacing below
the title as the transaction request screen

## @metamask/tron-wallet-snap 4.1.0

### Added
- Emit `transaction_type` and `transaction_status` on the transaction
lifecycle events, with `transaction_type` derived from the contract type
(so a flow can be attributed by combining `origin` and
`transaction_type`) and `transaction_status` reporting the on-chain
outcome on `Transaction Finalized`.
([#399](MetaMask/internal-snaps#399),
[#405](MetaMask/internal-snaps#405))

### Changed
- Classify `transaction_type` for the unified swap/bridge flow with the
new optional `sourceAssetId`/`destAssetId` request options. Classify
TRC20 smart-contract calls by function selector (so a `transfer` reports
`send` and an `approve` reports `tokenApprove` instead of `unknown`)
([#434](MetaMask/internal-snaps#434))
- Change the last behaviours missing for the `AssetsController`
migration to happen
([#424](MetaMask/internal-snaps#424))
- When the assets migration feature flag is active, the snap no longer
fetches, persists, or publishes assets: the periodic sync cronjob and
the synchronization triggered by selected account changes no longer
touch assets or emit `AccountAssetListUpdated` and
`AccountBalancesUpdated` events, leaving asset syncing to the
`AssetsController`
- When the live assets and balances are fetched by `getAccountAssets`
and `getAccountBalances`, they are persisted to local state without
emitting `AccountAssetListUpdated` and `AccountBalancesUpdated` events
- Validate network and CAIP asset type values coming from untrusted
boundaries (RPC request params, the Keyring API, the AssetsController)
instead of force-casting them, so unsupported values fail fast with an
`Invalid params` error
([#403](MetaMask/internal-snaps#403))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#396](MetaMask/internal-snaps#396))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#414](MetaMask/internal-snaps#414))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of a loading skeleton
- Render the confirmation fee asset rows with the shared `Asset`
component from `@metamask/snap-networks-utils`
([#429](MetaMask/internal-snaps#429))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#438](MetaMask/internal-snaps#438))
- `listAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's TronGrid clients instead of
returning persisted state.
([#388](MetaMask/internal-snaps#388))

### Fixed
- Show "Estimated changes are not available" instead of "No estimated
changes" when the transaction scan returns an error result, such as for
a malformed transaction
([#396](MetaMask/internal-snaps#396))
- Report the MetaMask origin as lowercase `metamask` instead of
`MetaMask` for MetaMask-initiated operations, so the origin matches the
value used by the other non-EVM snaps and granted to the keyring
methods, and so transaction scan requests are attributed to
`https://metamask.io`. The confirmation UI keeps displaying `MetaMask`.
([#392](MetaMask/internal-snaps#392))

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: (feat): bump Tron, Solana and Bitcoin snaps

## **Related issues**

Fixes: N/A

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Upgrades bridge and multichain snap packages with LavaMoat policy
changes; activity amount display changes affect swap UX but are limited
to an incomplete-swap edge case.
>
> **Overview**
> Bumps **@metamask/solana-wallet-snap** (`^7.1.0`),
**@metamask/tron-wallet-snap** (`^4.1.0`),
**@metamask/bridge-controller** (`^82.0.2`), and
**@metamask/bridge-status-controller** (`^76.4.0`), with **yarn
resolutions** pinning `@metamask/bridge-controller@npm:^82.0.2` and
`reselect@npm:^5.1.1`, plus matching **LavaMoat** policy entries that
scope `@metamask/bridge-controller` under the bridge-status-controller
dependency path across MV2/MV3 variants.
>
> **Activity list:** `useActivityRowContent` no longer shows
primary/secondary amounts for **incomplete swaps** when the source token
amount is `'0'` (no destination token), avoiding misleading
zero/placeholder values—aligned with updated snap transaction typing for
unified swap/bridge flows.
>
> **Tests:** unit coverage for that swap row behavior; Solana swap E2E
flows now wait for **confirmed** status and use `checkTransactionAmount`
instead of index-based amount checks.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0540fc2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
runway-github Bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Oct 15, 2026
## **Description**

This pull request updates several dependencies in the `package.json`
file to use newer versions of key MetaMask Snap packages. These updates
ensure compatibility with the latest features and bug fixes provided by
those packages.
It also refines how swap activity rows are displayed and tested,
especially for incomplete swaps with zero source amounts.

**Dependency updates:**

* Upgraded `@metamask/solana-wallet-snap` from version `^7.0.0` to
`^7.1.0`.
* Upgraded `@metamask/tron-wallet-snap` from version `^4.0.0` to
`^4.1.0`.

**Swap Activity Row Display Logic:**

- Updated `useActivityRowContent` to omit both primary and secondary
amounts for incomplete swaps where the source amount is zero, preventing
display of irrelevant or misleading values.
[[1]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dR146-R156)
[[2]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dL161-R177)

**Testing Enhancements:**

- Added tests to verify that amounts are omitted for incomplete swaps
with a zero source amount, and that formatting functions are not called
in this case.
- Improved tests to check that formatted amounts are correctly used for
complete swaps and that the correct props are passed to display
components.
[[1]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R137-R139)
[[2]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R206-R207)
[[3]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R216-R218)

**E2E Test Adjustments:**

- Refactored Solana swap E2E tests to use more accurate transaction
status and amount checks, aligning with the new display logic.
[[1]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L579-R580)
[[2]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L626-R628)

## @metamask/solana-wallet-snap 7.1.0

### Added
- Emit `transaction_type` on the transaction lifecycle events.
([#401](MetaMask/internal-snaps#401))

### Changed
- `getAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's Solana RPC clients instead of
returning persisted state.
([#432](MetaMask/internal-snaps#432))
- Classify `transaction_type` for the unified swap/bridge flow with the
shared `resolveFlowTransactionType` utility and the new optional
`sourceAssetId`/`destAssetId` request options, carried through to
`Transaction Finalized`.
([#439](MetaMask/internal-snaps#439))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#384](MetaMask/internal-snaps#384))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#409](MetaMask/internal-snaps#409))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of no banner
- Render the confirmation network fee with the shared `Asset` component
from `@metamask/snap-networks-utils`
([#427](MetaMask/internal-snaps#427))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#436](MetaMask/internal-snaps#436))
- The sign message and sign-in screens now have the same spacing below
the title as the transaction request screen

## @metamask/tron-wallet-snap 4.1.0

### Added
- Emit `transaction_type` and `transaction_status` on the transaction
lifecycle events, with `transaction_type` derived from the contract type
(so a flow can be attributed by combining `origin` and
`transaction_type`) and `transaction_status` reporting the on-chain
outcome on `Transaction Finalized`.
([#399](MetaMask/internal-snaps#399),
[#405](MetaMask/internal-snaps#405))

### Changed
- Classify `transaction_type` for the unified swap/bridge flow with the
new optional `sourceAssetId`/`destAssetId` request options. Classify
TRC20 smart-contract calls by function selector (so a `transfer` reports
`send` and an `approve` reports `tokenApprove` instead of `unknown`)
([#434](MetaMask/internal-snaps#434))
- Change the last behaviours missing for the `AssetsController`
migration to happen
([#424](MetaMask/internal-snaps#424))
- When the assets migration feature flag is active, the snap no longer
fetches, persists, or publishes assets: the periodic sync cronjob and
the synchronization triggered by selected account changes no longer
touch assets or emit `AccountAssetListUpdated` and
`AccountBalancesUpdated` events, leaving asset syncing to the
`AssetsController`
- When the live assets and balances are fetched by `getAccountAssets`
and `getAccountBalances`, they are persisted to local state without
emitting `AccountAssetListUpdated` and `AccountBalancesUpdated` events
- Validate network and CAIP asset type values coming from untrusted
boundaries (RPC request params, the Keyring API, the AssetsController)
instead of force-casting them, so unsupported values fail fast with an
`Invalid params` error
([#403](MetaMask/internal-snaps#403))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#396](MetaMask/internal-snaps#396))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#414](MetaMask/internal-snaps#414))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of a loading skeleton
- Render the confirmation fee asset rows with the shared `Asset`
component from `@metamask/snap-networks-utils`
([#429](MetaMask/internal-snaps#429))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#438](MetaMask/internal-snaps#438))
- `listAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's TronGrid clients instead of
returning persisted state.
([#388](MetaMask/internal-snaps#388))

### Fixed
- Show "Estimated changes are not available" instead of "No estimated
changes" when the transaction scan returns an error result, such as for
a malformed transaction
([#396](MetaMask/internal-snaps#396))
- Report the MetaMask origin as lowercase `metamask` instead of
`MetaMask` for MetaMask-initiated operations, so the origin matches the
value used by the other non-EVM snaps and granted to the keyring
methods, and so transaction scan requests are attributed to
`https://metamask.io`. The confirmation UI keeps displaying `MetaMask`.
([#392](MetaMask/internal-snaps#392))

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: (feat): bump Tron, Solana and Bitcoin snaps

## **Related issues**

Fixes: N/A

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Upgrades bridge and multichain snap packages with LavaMoat policy
changes; activity amount display changes affect swap UX but are limited
to an incomplete-swap edge case.
> 
> **Overview**
> Bumps **@metamask/solana-wallet-snap** (`^7.1.0`),
**@metamask/tron-wallet-snap** (`^4.1.0`),
**@metamask/bridge-controller** (`^82.0.2`), and
**@metamask/bridge-status-controller** (`^76.4.0`), with **yarn
resolutions** pinning `@metamask/bridge-controller@npm:^82.0.2` and
`reselect@npm:^5.1.1`, plus matching **LavaMoat** policy entries that
scope `@metamask/bridge-controller` under the bridge-status-controller
dependency path across MV2/MV3 variants.
> 
> **Activity list:** `useActivityRowContent` no longer shows
primary/secondary amounts for **incomplete swaps** when the source token
amount is `'0'` (no destination token), avoiding misleading
zero/placeholder values—aligned with updated snap transaction typing for
unified swap/bridge flows.
> 
> **Tests:** unit coverage for that swap row behavior; Solana swap E2E
flows now wait for **confirmed** status and use `checkTransactionAmount`
instead of index-based amount checks.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0540fc2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
runway-github Bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Oct 15, 2026
## **Description**

This pull request updates several dependencies in the `package.json`
file to use newer versions of key MetaMask Snap packages. These updates
ensure compatibility with the latest features and bug fixes provided by
those packages.
It also refines how swap activity rows are displayed and tested,
especially for incomplete swaps with zero source amounts.

**Dependency updates:**

* Upgraded `@metamask/solana-wallet-snap` from version `^7.0.0` to
`^7.1.0`.
* Upgraded `@metamask/tron-wallet-snap` from version `^4.0.0` to
`^4.1.0`.

**Swap Activity Row Display Logic:**

- Updated `useActivityRowContent` to omit both primary and secondary
amounts for incomplete swaps where the source amount is zero, preventing
display of irrelevant or misleading values.
[[1]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dR146-R156)
[[2]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dL161-R177)

**Testing Enhancements:**

- Added tests to verify that amounts are omitted for incomplete swaps
with a zero source amount, and that formatting functions are not called
in this case.
- Improved tests to check that formatted amounts are correctly used for
complete swaps and that the correct props are passed to display
components.
[[1]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R137-R139)
[[2]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R206-R207)
[[3]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R216-R218)

**E2E Test Adjustments:**

- Refactored Solana swap E2E tests to use more accurate transaction
status and amount checks, aligning with the new display logic.
[[1]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L579-R580)
[[2]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L626-R628)

## @metamask/solana-wallet-snap 7.1.0

### Added
- Emit `transaction_type` on the transaction lifecycle events.
([#401](MetaMask/internal-snaps#401))

### Changed
- `getAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's Solana RPC clients instead of
returning persisted state.
([#432](MetaMask/internal-snaps#432))
- Classify `transaction_type` for the unified swap/bridge flow with the
shared `resolveFlowTransactionType` utility and the new optional
`sourceAssetId`/`destAssetId` request options, carried through to
`Transaction Finalized`.
([#439](MetaMask/internal-snaps#439))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#384](MetaMask/internal-snaps#384))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#409](MetaMask/internal-snaps#409))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of no banner
- Render the confirmation network fee with the shared `Asset` component
from `@metamask/snap-networks-utils`
([#427](MetaMask/internal-snaps#427))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#436](MetaMask/internal-snaps#436))
- The sign message and sign-in screens now have the same spacing below
the title as the transaction request screen

## @metamask/tron-wallet-snap 4.1.0

### Added
- Emit `transaction_type` and `transaction_status` on the transaction
lifecycle events, with `transaction_type` derived from the contract type
(so a flow can be attributed by combining `origin` and
`transaction_type`) and `transaction_status` reporting the on-chain
outcome on `Transaction Finalized`.
([#399](MetaMask/internal-snaps#399),
[#405](MetaMask/internal-snaps#405))

### Changed
- Classify `transaction_type` for the unified swap/bridge flow with the
new optional `sourceAssetId`/`destAssetId` request options. Classify
TRC20 smart-contract calls by function selector (so a `transfer` reports
`send` and an `approve` reports `tokenApprove` instead of `unknown`)
([#434](MetaMask/internal-snaps#434))
- Change the last behaviours missing for the `AssetsController`
migration to happen
([#424](MetaMask/internal-snaps#424))
- When the assets migration feature flag is active, the snap no longer
fetches, persists, or publishes assets: the periodic sync cronjob and
the synchronization triggered by selected account changes no longer
touch assets or emit `AccountAssetListUpdated` and
`AccountBalancesUpdated` events, leaving asset syncing to the
`AssetsController`
- When the live assets and balances are fetched by `getAccountAssets`
and `getAccountBalances`, they are persisted to local state without
emitting `AccountAssetListUpdated` and `AccountBalancesUpdated` events
- Validate network and CAIP asset type values coming from untrusted
boundaries (RPC request params, the Keyring API, the AssetsController)
instead of force-casting them, so unsupported values fail fast with an
`Invalid params` error
([#403](MetaMask/internal-snaps#403))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#396](MetaMask/internal-snaps#396))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#414](MetaMask/internal-snaps#414))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of a loading skeleton
- Render the confirmation fee asset rows with the shared `Asset`
component from `@metamask/snap-networks-utils`
([#429](MetaMask/internal-snaps#429))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#438](MetaMask/internal-snaps#438))
- `listAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's TronGrid clients instead of
returning persisted state.
([#388](MetaMask/internal-snaps#388))

### Fixed
- Show "Estimated changes are not available" instead of "No estimated
changes" when the transaction scan returns an error result, such as for
a malformed transaction
([#396](MetaMask/internal-snaps#396))
- Report the MetaMask origin as lowercase `metamask` instead of
`MetaMask` for MetaMask-initiated operations, so the origin matches the
value used by the other non-EVM snaps and granted to the keyring
methods, and so transaction scan requests are attributed to
`https://metamask.io`. The confirmation UI keeps displaying `MetaMask`.
([#392](MetaMask/internal-snaps#392))

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: (feat): bump Tron, Solana and Bitcoin snaps

## **Related issues**

Fixes: N/A

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Upgrades bridge and multichain snap packages with LavaMoat policy
changes; activity amount display changes affect swap UX but are limited
to an incomplete-swap edge case.
> 
> **Overview**
> Bumps **@metamask/solana-wallet-snap** (`^7.1.0`),
**@metamask/tron-wallet-snap** (`^4.1.0`),
**@metamask/bridge-controller** (`^82.0.2`), and
**@metamask/bridge-status-controller** (`^76.4.0`), with **yarn
resolutions** pinning `@metamask/bridge-controller@npm:^82.0.2` and
`reselect@npm:^5.1.1`, plus matching **LavaMoat** policy entries that
scope `@metamask/bridge-controller` under the bridge-status-controller
dependency path across MV2/MV3 variants.
> 
> **Activity list:** `useActivityRowContent` no longer shows
primary/secondary amounts for **incomplete swaps** when the source token
amount is `'0'` (no destination token), avoiding misleading
zero/placeholder values—aligned with updated snap transaction typing for
unified swap/bridge flows.
> 
> **Tests:** unit coverage for that swap row behavior; Solana swap E2E
flows now wait for **confirmed** status and use `checkTransactionAmount`
instead of index-based amount checks.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0540fc2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
sleepytanya pushed a commit to MetaMask/metamask-extension that referenced this pull request Oct 15, 2026
- feat: bump Tron, Solana snaps (#47048)

## **Description**

This pull request updates several dependencies in the `package.json`
file to use newer versions of key MetaMask Snap packages. These updates
ensure compatibility with the latest features and bug fixes provided by
those packages.
It also refines how swap activity rows are displayed and tested,
especially for incomplete swaps with zero source amounts.

**Dependency updates:**

* Upgraded `@metamask/solana-wallet-snap` from version `^7.0.0` to
`^7.1.0`.
* Upgraded `@metamask/tron-wallet-snap` from version `^4.0.0` to
`^4.1.0`.

**Swap Activity Row Display Logic:**

- Updated `useActivityRowContent` to omit both primary and secondary
amounts for incomplete swaps where the source amount is zero, preventing
display of irrelevant or misleading values.

[[1]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dR146-R156)

[[2]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dL161-R177)

**Testing Enhancements:**

- Added tests to verify that amounts are omitted for incomplete swaps
with a zero source amount, and that formatting functions are not called
in this case.
- Improved tests to check that formatted amounts are correctly used for
complete swaps and that the correct props are passed to display
components.

[[1]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R137-R139)

[[2]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R206-R207)

[[3]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R216-R218)

**E2E Test Adjustments:**

- Refactored Solana swap E2E tests to use more accurate transaction
status and amount checks, aligning with the new display logic.

[[1]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L579-R580)

[[2]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L626-R628)

## @metamask/solana-wallet-snap 7.1.0

### Added
- Emit `transaction_type` on the transaction lifecycle events.
([#401](MetaMask/internal-snaps#401))

### Changed
- `getAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's Solana RPC clients instead of
returning persisted state.
([#432](MetaMask/internal-snaps#432))
- Classify `transaction_type` for the unified swap/bridge flow with the
shared `resolveFlowTransactionType` utility and the new optional
`sourceAssetId`/`destAssetId` request options, carried through to
`Transaction Finalized`.
([#439](MetaMask/internal-snaps#439))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#384](MetaMask/internal-snaps#384))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#409](MetaMask/internal-snaps#409))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of no banner
- Render the confirmation network fee with the shared `Asset` component
from `@metamask/snap-networks-utils`
([#427](MetaMask/internal-snaps#427))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#436](MetaMask/internal-snaps#436))
- The sign message and sign-in screens now have the same spacing below
the title as the transaction request screen

## @metamask/tron-wallet-snap 4.1.0

### Added
- Emit `transaction_type` and `transaction_status` on the transaction
lifecycle events, with `transaction_type` derived from the contract type
(so a flow can be attributed by combining `origin` and
`transaction_type`) and `transaction_status` reporting the on-chain
outcome on `Transaction Finalized`.
([#399](MetaMask/internal-snaps#399),
[#405](MetaMask/internal-snaps#405))

### Changed
- Classify `transaction_type` for the unified swap/bridge flow with the
new optional `sourceAssetId`/`destAssetId` request options. Classify
TRC20 smart-contract calls by function selector (so a `transfer` reports
`send` and an `approve` reports `tokenApprove` instead of `unknown`)
([#434](MetaMask/internal-snaps#434))
- Change the last behaviours missing for the `AssetsController`
migration to happen
([#424](MetaMask/internal-snaps#424))
- When the assets migration feature flag is active, the snap no longer
fetches, persists, or publishes assets: the periodic sync cronjob and
the synchronization triggered by selected account changes no longer
touch assets or emit `AccountAssetListUpdated` and
`AccountBalancesUpdated` events, leaving asset syncing to the
`AssetsController`
- When the live assets and balances are fetched by `getAccountAssets`
and `getAccountBalances`, they are persisted to local state without
emitting `AccountAssetListUpdated` and `AccountBalancesUpdated` events
- Validate network and CAIP asset type values coming from untrusted
boundaries (RPC request params, the Keyring API, the AssetsController)
instead of force-casting them, so unsupported values fail fast with an
`Invalid params` error
([#403](MetaMask/internal-snaps#403))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([#396](MetaMask/internal-snaps#396))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([#414](MetaMask/internal-snaps#414))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of a loading skeleton
- Render the confirmation fee asset rows with the shared `Asset`
component from `@metamask/snap-networks-utils`
([#429](MetaMask/internal-snaps#429))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([#438](MetaMask/internal-snaps#438))
- `listAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's TronGrid clients instead of
returning persisted state.
([#388](MetaMask/internal-snaps#388))

### Fixed
- Show "Estimated changes are not available" instead of "No estimated
changes" when the transaction scan returns an error result, such as for
a malformed transaction
([#396](MetaMask/internal-snaps#396))
- Report the MetaMask origin as lowercase `metamask` instead of
`MetaMask` for MetaMask-initiated operations, so the origin matches the
value used by the other non-EVM snaps and granted to the keyring
methods, and so transaction scan requests are attributed to
`https://metamask.io`. The confirmation UI keeps displaying `MetaMask`.
([#392](MetaMask/internal-snaps#392))

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: (feat): bump Tron, Solana and Bitcoin snaps

## **Related issues**

Fixes: N/A

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding

Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling

guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Upgrades bridge and multichain snap packages with LavaMoat policy
changes; activity amount display changes affect swap UX but are limited
to an incomplete-swap edge case.
> 
> **Overview**
> Bumps **@metamask/solana-wallet-snap** (`^7.1.0`),
**@metamask/tron-wallet-snap** (`^4.1.0`),
**@metamask/bridge-controller** (`^82.0.2`), and
**@metamask/bridge-status-controller** (`^76.4.0`), with **yarn
resolutions** pinning `@metamask/bridge-controller@npm:^82.0.2` and
`reselect@npm:^5.1.1`, plus matching **LavaMoat** policy entries that
scope `@metamask/bridge-controller` under the bridge-status-controller
dependency path across MV2/MV3 variants.
> 
> **Activity list:** `useActivityRowContent` no longer shows
primary/secondary amounts for **incomplete swaps** when the source token
amount is `'0'` (no destination token), avoiding misleading
zero/placeholder values—aligned with updated snap transaction typing for
unified swap/bridge flows.
> 
> **Tests:** unit coverage for that swap row behavior; Solana swap E2E
flows now wait for **confirmed** status and use `checkTransactionAmount`
instead of index-based amount checks.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0540fc2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[bdbf80b](bdbf80b)

---------

Co-authored-by: Battambang <frederic.heng@consensys.net>
Co-authored-by: metamask-ci[bot] <271559518+metamask-ci[bot]@users.noreply.github.com>
LabinatorSolutions pushed a commit to LabinatorSolutions/metamask-extension that referenced this pull request Oct 15, 2026
## **Description**

This pull request updates several dependencies in the `package.json`
file to use newer versions of key MetaMask Snap packages. These updates
ensure compatibility with the latest features and bug fixes provided by
those packages.
It also refines how swap activity rows are displayed and tested,
especially for incomplete swaps with zero source amounts.

**Dependency updates:**

* Upgraded `@metamask/solana-wallet-snap` from version `^7.0.0` to
`^7.1.0`.
* Upgraded `@metamask/tron-wallet-snap` from version `^4.0.0` to
`^4.1.0`.

**Swap Activity Row Display Logic:**

- Updated `useActivityRowContent` to omit both primary and secondary
amounts for incomplete swaps where the source amount is zero, preventing
display of irrelevant or misleading values.
[[1]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dR146-R156)
[[2]](diffhunk://#diff-dddf8238e1e7d70a4fd19691e75735188b061ec306a5ca5cbea8542b5209a61dL161-R177)

**Testing Enhancements:**

- Added tests to verify that amounts are omitted for incomplete swaps
with a zero source amount, and that formatting functions are not called
in this case.
- Improved tests to check that formatted amounts are correctly used for
complete swaps and that the correct props are passed to display
components.
[[1]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R137-R139)
[[2]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R206-R207)
[[3]](diffhunk://#diff-63782c2a8671e685cb2199df37dec9a477a6676a6fed4bae311c5135648766c8R216-R218)

**E2E Test Adjustments:**

- Refactored Solana swap E2E tests to use more accurate transaction
status and amount checks, aligning with the new display logic.
[[1]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L579-R580)
[[2]](diffhunk://#diff-0d5954dd42b101c8aec3ae96df7b8fc5d42ffc53efe35a8aaa061b9325f2b253L626-R628)

## @metamask/solana-wallet-snap 7.1.0

### Added
- Emit `transaction_type` on the transaction lifecycle events.
([MetaMask#401](MetaMask/internal-snaps#401))

### Changed
- `getAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's Solana RPC clients instead of
returning persisted state.
([MetaMask#432](MetaMask/internal-snaps#432))
- Classify `transaction_type` for the unified swap/bridge flow with the
shared `resolveFlowTransactionType` utility and the new optional
`sourceAssetId`/`destAssetId` request options, carried through to
`Transaction Finalized`.
([MetaMask#439](MetaMask/internal-snaps#439))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([MetaMask#384](MetaMask/internal-snaps#384))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([MetaMask#409](MetaMask/internal-snaps#409))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of no banner
- Render the confirmation network fee with the shared `Asset` component
from `@metamask/snap-networks-utils`
([MetaMask#427](MetaMask/internal-snaps#427))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([MetaMask#436](MetaMask/internal-snaps#436))
- The sign message and sign-in screens now have the same spacing below
the title as the transaction request screen

## @metamask/tron-wallet-snap 4.1.0

### Added
- Emit `transaction_type` and `transaction_status` on the transaction
lifecycle events, with `transaction_type` derived from the contract type
(so a flow can be attributed by combining `origin` and
`transaction_type`) and `transaction_status` reporting the on-chain
outcome on `Transaction Finalized`.
([MetaMask#399](MetaMask/internal-snaps#399),
[MetaMask#405](MetaMask/internal-snaps#405))

### Changed
- Classify `transaction_type` for the unified swap/bridge flow with the
new optional `sourceAssetId`/`destAssetId` request options. Classify
TRC20 smart-contract calls by function selector (so a `transfer` reports
`send` and an `approve` reports `tokenApprove` instead of `unknown`)
([MetaMask#434](MetaMask/internal-snaps#434))
- Change the last behaviours missing for the `AssetsController`
migration to happen
([MetaMask#424](MetaMask/internal-snaps#424))
- When the assets migration feature flag is active, the snap no longer
fetches, persists, or publishes assets: the periodic sync cronjob and
the synchronization triggered by selected account changes no longer
touch assets or emit `AccountAssetListUpdated` and
`AccountBalancesUpdated` events, leaving asset syncing to the
`AssetsController`
- When the live assets and balances are fetched by `getAccountAssets`
and `getAccountBalances`, they are persisted to local state without
emitting `AccountAssetListUpdated` and `AccountBalancesUpdated` events
- Validate network and CAIP asset type values coming from untrusted
boundaries (RPC request params, the Keyring API, the AssetsController)
instead of force-casting them, so unsupported values fail fast with an
`Invalid params` error
([MetaMask#403](MetaMask/internal-snaps#403))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([MetaMask#396](MetaMask/internal-snaps#396))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([MetaMask#414](MetaMask/internal-snaps#414))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of a loading skeleton
- Render the confirmation fee asset rows with the shared `Asset`
component from `@metamask/snap-networks-utils`
([MetaMask#429](MetaMask/internal-snaps#429))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([MetaMask#438](MetaMask/internal-snaps#438))
- `listAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's TronGrid clients instead of
returning persisted state.
([MetaMask#388](MetaMask/internal-snaps#388))

### Fixed
- Show "Estimated changes are not available" instead of "No estimated
changes" when the transaction scan returns an error result, such as for
a malformed transaction
([MetaMask#396](MetaMask/internal-snaps#396))
- Report the MetaMask origin as lowercase `metamask` instead of
`MetaMask` for MetaMask-initiated operations, so the origin matches the
value used by the other non-EVM snaps and granted to the keyring
methods, and so transaction scan requests are attributed to
`https://metamask.io`. The confirmation UI keeps displaying `MetaMask`.
([MetaMask#392](MetaMask/internal-snaps#392))

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: (feat): bump Tron, Solana and Bitcoin snaps

## **Related issues**

Fixes: N/A

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Upgrades bridge and multichain snap packages with LavaMoat policy
changes; activity amount display changes affect swap UX but are limited
to an incomplete-swap edge case.
> 
> **Overview**
> Bumps **@metamask/solana-wallet-snap** (`^7.1.0`),
**@metamask/tron-wallet-snap** (`^4.1.0`),
**@metamask/bridge-controller** (`^82.0.2`), and
**@metamask/bridge-status-controller** (`^76.4.0`), with **yarn
resolutions** pinning `@metamask/bridge-controller@npm:^82.0.2` and
`reselect@npm:^5.1.1`, plus matching **LavaMoat** policy entries that
scope `@metamask/bridge-controller` under the bridge-status-controller
dependency path across MV2/MV3 variants.
> 
> **Activity list:** `useActivityRowContent` no longer shows
primary/secondary amounts for **incomplete swaps** when the source token
amount is `'0'` (no destination token), avoiding misleading
zero/placeholder values—aligned with updated snap transaction typing for
unified swap/bridge flows.
> 
> **Tests:** unit coverage for that swap row behavior; Solana swap E2E
flows now wait for **confirmed** status and use `checkTransactionAmount`
instead of index-based amount checks.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0540fc2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Poovarasan-Sandhanam pushed a commit to Poovarasan-Sandhanam/metamask-mobile that referenced this pull request Oct 19, 2026
<!--

Please submit this PR as a draft initially.

Do not mark it as "Ready for review" until this PR meets the canonical
Definition of Ready For Review in `docs/readme/ready-for-review.md`.

In short: the template must be materially complete (not just section
titles
present), all status checks must be currently passing, and the only
expected
follow-up commits must be reviewer-driven.
-->
<!--
mms-check directive vocabulary — read by
.github/scripts/shared/pr-template-checks.ts
at module load to build the validation plan. Directives are invisible in
rendered
markdown and must NOT be removed or edited without updating the
validator registry.

  type=text           Section must contain non-placeholder prose.
  type=changelog      Section must have a valid CHANGELOG entry: line.
type=issue-link Section must have a Fixes:/Closes:/Refs: line with a
value.
type=manual-testing Section must have real testing steps or an explicit
N/A.
type=screenshot Section must have evidence (image/URL) or an explicit
N/A.
type=checklist Section must have all checkboxes consciously checked.
required=true|false Whether a missing/invalid section runs the validator
at all.
blocking=true|false Whether a failure of this check fails the CI
workflow.
Default: false — failures are shown as warnings in the sticky
                      comment but do not block the PR.

Sections without a directive are checked for structural presence only.
-->

## **Description**
This pull request updates several dependencies in the `package.json`
file to bring in the latest versions of key MetaMask Snap packages.
These updates ensure compatibility with recent improvements and bug
fixes in the respective packages.

Dependency updates:

* Upgraded `@metamask/solana-wallet-snap` from version `7.0.0` to
`7.1.0`.
* Upgraded `@metamask/tron-wallet-snap` from version `4.0.0` to `4.1.0`.

## @metamask/solana-wallet-snap 7.1.0

### Added
- Emit `transaction_type` on the transaction lifecycle events.
([MetaMask#401](MetaMask/internal-snaps#401))

### Changed
- `getAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's Solana RPC clients instead of
returning persisted state.
([MetaMask#432](MetaMask/internal-snaps#432))
- Classify `transaction_type` for the unified swap/bridge flow with the
shared `resolveFlowTransactionType` utility and the new optional
`sourceAssetId`/`destAssetId` request options, carried through to
`Transaction Finalized`.
([MetaMask#439](MetaMask/internal-snaps#439))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([MetaMask#384](MetaMask/internal-snaps#384))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([MetaMask#409](MetaMask/internal-snaps#409))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of no banner
- Render the confirmation network fee with the shared `Asset` component
from `@metamask/snap-networks-utils`
([MetaMask#427](MetaMask/internal-snaps#427))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([MetaMask#436](MetaMask/internal-snaps#436))
- The sign message and sign-in screens now have the same spacing below
the title as the transaction request screen

## @metamask/tron-wallet-snap 4.1.0

### Added
- Emit `transaction_type` and `transaction_status` on the transaction
lifecycle events, with `transaction_type` derived from the contract type
(so a flow can be attributed by combining `origin` and
`transaction_type`) and `transaction_status` reporting the on-chain
outcome on `Transaction Finalized`.
([MetaMask#399](MetaMask/internal-snaps#399),
[MetaMask#405](MetaMask/internal-snaps#405))

### Changed
- Classify `transaction_type` for the unified swap/bridge flow with the
new optional `sourceAssetId`/`destAssetId` request options. Classify
TRC20 smart-contract calls by function selector (so a `transfer` reports
`send` and an `approve` reports `tokenApprove` instead of `unknown`)
([MetaMask#434](MetaMask/internal-snaps#434))
- Change the last behaviours missing for the `AssetsController`
migration to happen
([MetaMask#424](MetaMask/internal-snaps#424))
- When the assets migration feature flag is active, the snap no longer
fetches, persists, or publishes assets: the periodic sync cronjob and
the synchronization triggered by selected account changes no longer
touch assets or emit `AccountAssetListUpdated` and
`AccountBalancesUpdated` events, leaving asset syncing to the
`AssetsController`
- When the live assets and balances are fetched by `getAccountAssets`
and `getAccountBalances`, they are persisted to local state without
emitting `AccountAssetListUpdated` and `AccountBalancesUpdated` events
- Validate network and CAIP asset type values coming from untrusted
boundaries (RPC request params, the Keyring API, the AssetsController)
instead of force-casting them, so unsupported values fail fast with an
`Invalid params` error
([MetaMask#403](MetaMask/internal-snaps#403))
- Render the confirmation "Estimated changes" section with the shared
`EstimatedChanges` component from `@metamask/snap-networks-utils`
([MetaMask#396](MetaMask/internal-snaps#396))
- Estimated changes from the previous scan now stay visible while a
confirmation re-scans, instead of showing a loading skeleton
- Render the confirmation security alert banner with the shared
`TransactionAlert` component from `@metamask/snap-networks-utils`
([MetaMask#414](MetaMask/internal-snaps#414))
- A "Checking for security issues" banner is now shown while the
transaction scan is in progress, instead of a loading skeleton
- Render the confirmation fee asset rows with the shared `Asset`
component from `@metamask/snap-networks-utils`
([MetaMask#429](MetaMask/internal-snaps#429))
- Render the confirmation title with the shared `ActionHeader` component
from `@metamask/snap-networks-utils`
([MetaMask#438](MetaMask/internal-snaps#438))
- `listAccountAssets` and `getAccountBalances` now fetch live assets and
balances from the chain through the Snap's TronGrid clients instead of
returning persisted state.
([MetaMask#388](MetaMask/internal-snaps#388))

### Fixed
- Show "Estimated changes are not available" instead of "No estimated
changes" when the transaction scan returns an error result, such as for
a malformed transaction
([MetaMask#396](MetaMask/internal-snaps#396))
- Report the MetaMask origin as lowercase `metamask` instead of
`MetaMask` for MetaMask-initiated operations, so the origin matches the
value used by the other non-EVM snaps and granted to the keyring
methods, and so transaction scan requests are attributed to
`https://metamask.io`. The confirmation UI keeps displaying `MetaMask`.
([MetaMask#392](MetaMask/internal-snaps#392))

<!-- mms-check: type=text required=true -->

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!-- mms-check: type=changelog required=true blocking=true -->

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: feat: bump Tron, Solana and Bitcoin snaps

## **Related issues**

<!-- mms-check: type=issue-link required=true -->

Fixes: N/A

## **Manual testing steps**

<!-- mms-check: type=manual-testing required=true -->

```gherkin
Feature: Non-EVM network

  Scenario: user send fund
    Given having Tron, Solana and Bitcoin fund

    When user sendsfund
    Then the transaction and balance should succeed
```

## **Screenshots/Recordings**

<!-- mms-check: type=screenshot required=true -->

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

N/A

<!-- [screenshots/recordings] -->

### **After**

N/A

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

<!-- mms-check: type=checklist required=true -->

<!--
Every checklist item must be consciously assessed before marking this PR
as
"Ready for review". A checked box means you deliberately considered that
responsibility, not that you literally performed every action listed.

Unchecked boxes are ambiguous: they are not an implicit "N/A" and they
are not
a silent "skip". See `docs/readme/ready-for-review.md` for the full
checklist
semantics.
-->

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [x] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **Pre-merge reviewer checklist**

<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->

- [ ] 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.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Wallet snap upgrades touch non-EVM send/swap confirmation and balance
behavior, and the recurring-tab feature ID rename affects analytics and
API attribution for that flow.
> 
> **Overview**
> Bumps **Solana** (`7.1.0`) and **Tron** (`4.1.0`) wallet snaps plus
**bridge** packages (`@metamask/bridge-controller` `82.0.3`,
`@metamask/bridge-status-controller` `76.4.0`,
`@metamask/assets-controllers` `112.1.2`), with matching `yarn.lock`
updates.
> 
> Aligns the mobile app with **bridge-controller** by mapping the Bridge
**Recurring** tab to `FeatureId.RECURRING_ORDER` (replacing
`RECURRING_BUY`) in `TAB_TO_FEATURE_ID`, and updates Bridge unit tests
that assert recurring-flow `feature_id` in analytics and token search
requests.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1207793. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants