Skip to content

chore: preview build from https://github.com/MetaMask/internal-snaps/pull/134 - #34417

Open
gabrieledm wants to merge 6 commits into
mainfrom
fix/WPN-1745_sun-USDT-swap-incorrect-total-amount-of-0
Open

chore: preview build from https://github.com/MetaMask/internal-snaps/pull/134#34417
gabrieledm wants to merge 6 commits into
mainfrom
fix/WPN-1745_sun-USDT-swap-incorrect-total-amount-of-0

Conversation

@gabrieledm

@gabrieledm gabrieledm commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates the preinstalled Tron Wallet Snap preview version 3.0.0-preview-05ea60a5, generated from MetaMask/internal-snaps#134

Fixes Tron transaction activity displaying 0 SUN or -0 SUN for SUN -> USDT swaps routed through Rango and SunSwap.

Changelog

CHANGELOG entry: Fix SUN -> USDT swaps routed through Rango and SunSwap displaying a zero SUN amount in transaction activity

Related issues

Fixes: WPN-1745

Manual testing steps

  1. Open Swap.
  2. Select SUN as the source token and USDT as the destination token.
  3. Enter an amount and select a quote routed through Rango -> SunSwap.
    • If that route is not initially offered, adjust the amount and refresh the quotes.
  4. Submit the swap and wait for it to be confirmed.
  5. Open the Activity tab and select the completed swap.
  6. Verify:
    • The activity is shown as a SUN -> USDT swap.
    • The sent SUN amount matches the submitted amount.
    • The sent amount is not 0 SUN or -0 SUN.
    • The received USDT amount is non-zero and matches the completed swap.
  7. As regression coverage, complete a USDT -> SUN swap and verify both amounts display correctly.
  8. If another TRC-20 -> TRC-20 route is available, complete it and verify its sent and received amounts remain correct.

Screenshots/Recordings

Before

After

WPN-1745  Mobile - After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Note

Medium Risk
Preview snap replaces a stable release for Tron signing and transaction metadata; scope is dependency-only but affects swap activity display and any Tron snap behavior in that build.

Overview
Swaps SUN → USDT via Rango / SunSwap no longer show 0 SUN or -0 SUN in Activity after this preview snap lands.

@metamask/tron-wallet-snap moves from ^1.33.1 to npm:@metamask-previews/tron-wallet-snap@3.0.0-preview-05ea60a5 (preview from internal-snaps#134); yarn.lock is updated accordingly. There are no mobile app source changes—only the bundled snap version.

Reviewed by Cursor Bugbot for commit b2bf963. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Aug 6, 2026
@metamask-ci metamask-ci Bot added the team-networks Networks team label Aug 6, 2026
@metamask-ci

metamask-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've tested with a power user scenario"). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@socket-security

socket-security Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​metamask-previews/​tron-wallet-snap@​3.0.0-preview-05ea60a57610010098100

View full report

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions Bot added the risk:medium AI analysis: medium risk label Aug 7, 2026
@gabrieledm gabrieledm removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeSnaps, SmokeStake, SmokeAccounts, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 78%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR updates @metamask/tron-wallet-snap from stable ^1.33.1 to a preview version 3.0.0-preview-05ea60a5 — a major version bump (1.x → 3.x) via a preview channel.

Why these tags:

  1. SmokeSnaps: The Tron wallet snap is a preinstalled snap (loaded in app/lib/snaps/preinstalled-snaps.ts under the tron build flag). A major version bump to a preview build could affect snap installation, lifecycle, and preinstalled snap behavior. test-snap-preinstalled.spec.ts and snap management tests are directly relevant.

  2. SmokeStake: The Tron wallet snap is used in Tron staking flows (useTronStake, useTronUnstake, useTronClaimUnstakedTrx hooks in app/components/UI/Earn/). A breaking change in the snap API (3.0.0 is a major version) could affect staking/earn flows. Per tag dependency rules, SmokeStake also requires SmokeConfirmations.

  3. SmokeAccounts: The snap is integrated with SnapKeyring (app/core/SnapKeyring/TronWalletSnap.ts) for Tron account management. Changes to the snap could affect account creation, management, and display.

  4. SmokeConfirmations: Required as a dependency of SmokeStake (staking transactions go through confirmations).

No performance tests: This is a dependency version bump with no changes to app rendering, data fetching, or performance-sensitive code paths. No performance tags are warranted.

Performance Test Selection:
The change is purely a dependency version bump for the Tron wallet snap. There are no changes to app rendering logic, data fetching pipelines, navigation flows, or any performance-sensitive code paths. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:medium AI analysis: medium risk size-XS team-networks Networks team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant