chore: preview build from https://github.com/MetaMask/internal-snaps/pull/108 - #44928
Conversation
|
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
|
Builds ready [9d9032e]
⚡ Performance Benchmarks (Total: 🟢 20 pass · 🟡 1 warn · 🔴 0 fail)
Bundle size diffs [🚀 Bundle size reduced!]
|
…or-swap-operation-from-usdc-to-sol
…or-swap-operation-from-usdc-to-sol
…ration-from-usdc-to-sol' of https://github.com/MetaMask/metamask-extension into fix/WPN-1223_solana-incorrect-event-logged-for-swap-operation-from-usdc-to-sol
Builds ready [f2964b3]
⚡ Performance Benchmarks (Total: 🟢 12 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs
|
…or-swap-operation-from-usdc-to-sol
Builds ready [dce7b5d]
⚡ Performance Benchmarks (Total: 🟢 10 pass · 🟡 13 warn · 🔴 1 fail)
Bundle size diffs
|
Builds ready [8353c91]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 14 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [8353c91]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 14 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
✨ Files requiring CODEOWNER review ✨🧪 @MetaMask/qa (1 files, +4 -1)
|
Builds ready [177fa1f]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 15 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…or-swap-operation-from-usdc-to-sol
|



Description
This PR updates the preinstalled Solana Wallet Snap from
^2.10.0to preview version5.0.0-preview-a5753bb0, generated from MetaMask/internal-snaps#108The preview fixes an issue where small USDC-to-SOL swaps could be displayed as sends in the activity history.
When the received SOL was less than or equal to the transaction fee, the raw SOL balance could decrease even though SOL was received, causing the transaction to be classified incorrectly.
The Snap now determines native transfer direction using the fee-adjusted balance difference.
This correctly identifies the incoming SOL leg and classifies the transaction as a swap regardless of whether the received amount is less than, equal to, or greater than the transaction fee.
This PR only updates the Snap dependency and corresponding lockfile; the implementation and automated tests are contained in the linked Snap PR.
Added
e2etest for case when the received SOL is less than the transaction feeChangelog
CHANGELOG entry: Fixed small USDC-to-SOL swaps being incorrectly displayed as sends in Solana activity
Related issues
Fixes: #43164
Manual testing steps
Screenshots/Recordings
Before
WPN-1223.Before.mov
After
WPN-1223.After.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Swaps in a preview snap (not a stable release) affect Solana activity classification; risk is mitigated by targeted E2E tests and limited extension code changes beyond the dependency bump.
Overview
Bumps
@metamask/solana-wallet-snapfrom^2.10.0to preview5.0.0-preview-a5753bb0(from internal-snaps#108), with matchingyarn.lockupdates, so activity history uses fee-adjusted native SOL deltas when classifying swaps.Adds Solana swap E2E coverage for the regression where received SOL is smaller than the network fee: parameterized
UsdcToSolSwapAmountskeeps bridge quotes,getTransaction, andgetTxStatusmocks aligned;SwapPage.reviewQuoteaccepts an optionalexchangeRatewhen the UI rate differs from the destination amount; a new spec asserts Activity shows “Swapped” for a tiny USDC→SOL swap. USDC→SOL fixture setup is refactored intobuildUsdcToSolFixture().Reviewed by Cursor Bugbot for commit 1b5a0f4. Bugbot is set up for automated code reviews on this repo. Configure here.