chore: preview build from https://github.com/MetaMask/internal-snaps/pull/108 - #34114
Conversation
…or-swap-operation-from-usdc-to-sol
|
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. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34114 +/- ##
==========================================
+ Coverage 84.90% 85.03% +0.13%
==========================================
Files 6277 6314 +37
Lines 170088 171736 +1648
Branches 41681 42424 +743
==========================================
+ Hits 144416 146043 +1627
+ Misses 15832 15685 -147
- Partials 9840 10008 +168 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…or-swap-operation-from-usdc-to-sol
…or-swap-operation-from-usdc-to-sol
…or-swap-operation-from-usdc-to-sol
…or-swap-operation-from-usdc-to-sol
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Why this is high risk:
Tag selection rationale:
Performance Test Selection: |
|
…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#108.The 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.
Changelog
CHANGELOG entry: Fixed small USDC-to-SOL swaps being incorrectly displayed as sends in Solana activity
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Preview snap replaces a stable release for Solana signing and transaction parsing; scope is dependency-only but affects all Solana wallet behavior until a stable 5.x ships.
Overview
Bumps the preinstalled
@metamask/solana-wallet-snapdependency from stable^2.10.0to preview@metamask-previews/solana-wallet-snap@5.0.0-preview-a5753bb0(from internal-snaps PR 108), with matchingyarn.lockupdates only—no mobile app source changes.That preview snap fixes Solana activity misclassification: tiny USDC→SOL swaps could show as sends when received SOL was ≤ the fee, because raw SOL balance could drop despite an incoming leg. The snap now infers native transfer direction from a fee-adjusted balance delta so swaps classify correctly in Activity.
Reviewed by Cursor Bugbot for commit b41a9e0. Bugbot is set up for automated code reviews on this repo. Configure here.