metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

feat: enable spot-prices v3

Open bergarces opened this issue 1 month ago • 3 comments

Description

Enable spot prices v3 by removing patch forcing a fallback.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1746

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

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] Removes the local patch and uses upstream @metamask/assets-controllers, enabling spot-prices v3.

  • Dependencies:
    • Switch @metamask/assets-controllers from a local Yarn patch to upstream (^93.0.0), resolving to 93.1.0 in yarn.lock.
  • Build/Config:
    • Delete patch file at .yarn/patches/@metamask-assets-controllers-npm-93.0.0-*.patch.
    • Update yarn.lock to remove patched entries and reflect upstream package resolution.

Written by Cursor Bugbot for commit f9ab2d4b4e0de0ffb5ff4caeba35ebf63ac63b0a. This will update automatically on new commits. Configure here.

bergarces avatar Nov 28 '25 14:11 bergarces

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[bot] avatar Nov 28 '25 14:11 github-actions[bot]

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAssets, SmokeSwaps, SmokeTrade, SmokeStake, SmokeWalletPlatform, SmokeCore, SmokeRamps
  • Risk Level: high
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

This PR removes a patch from @metamask/assets-controllers that was disabling native token price support (SPOT_PRICES_SUPPORT_INFO CAIP-19 mappings) for almost all major EVM networks including Ethereum, Polygon, Arbitrum, Base, Optimism, Avalanche, Linea, zkSync, and many others.

By removing this patch and upgrading to the unpatched 93.1.0 version, native token prices will now be fetched using the Prices API V3 with proper CAIP-19 asset mappings. This is a significant change affecting:

  1. Token pricing across the app - TokenRatesController and marketData used throughout
  2. Asset display - Token list items showing price percentage changes (useTokenPricePercentageChange)
  3. Swaps functionality - QuotesView and useFiatConversionRates rely on token prices
  4. Staking - StakingBalance component uses token price percentage hooks
  5. Fiat conversions - Any feature converting token values to fiat
  6. Multi-chain support - Affects all major EVM networks

Selected tags cover:

  • SmokeAssets: Token display and price functionality
  • SmokeSwaps/SmokeTrade: Swap functionality relies on accurate price data
  • SmokeStake: Staking balance displays use price hooks
  • SmokeWalletPlatform: Core wallet functionality with token values
  • SmokeCore: Fundamental app state involving controllers
  • SmokeRamps: On/off ramp features may display fiat values

View GitHub Actions results

github-actions[bot] avatar Dec 11 '25 10:12 github-actions[bot]