Skip to content

Conversation

@matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Nov 9, 2025

Description

Use asset picker from send flow in MetaMask Pay.

Also display disabled entries in token list, including associated message.

Changelog

CHANGELOG entry: null

Related issues

Fixes: #6174

Manual testing steps

Screenshots/Recordings

Before

After

Asset Picker

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

Replaces the Pay With modal’s token selector with the Send flow’s Asset picker, adds disabled-token handling/no-gas messaging, drops the network selector modal, and updates hooks/types/tests accordingly.

  • UI/UX:
    • PayWithModal: Refactored to BottomSheet using send/asset picker; filters to EVM ERC20 tokens, shows zero-balance tokens if required/selected, and disables tokens lacking native gas with pay_with_modal.no_gas message.
    • Token: Supports disabled state (press disabled, opacity) and optional disabledMessage display.
    • Asset/TokenList: New props hideNfts, includeNoBalance, onTokenSelect, tokenFilter; adaptive search placeholder; NFT section hidden when hideNfts.
  • Navigation:
    • Removed Routes.CONFIRMATION_PAY_WITH_NETWORK_MODAL screen and references.
  • Data/Hooks/Types:
    • useAccountTokens accepts { includeNoBalance } to optionally include zero-balance assets.
    • Added disabled/disabledMessage to AssetType.
    • Removed useTransactionPayAvailableTokens hook and its tests.
  • Localization:
    • Added strings: send.search_tokens, pay_with_modal.no_gas.
  • Tests:
    • Added/updated tests for PayWithModal filtering/selection, token disabled behavior, Asset/TokenList props and behavior; removed obsolete network modal and available-tokens tests.

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

@matthewwalsh0 matthewwalsh0 changed the base branch from main to refactor/transaction-pay-controller November 9, 2025 00:03
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Nov 9, 2025
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review November 9, 2025 08:42
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner November 9, 2025 08:42
Base automatically changed from refactor/transaction-pay-controller to main November 10, 2025 10:36
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners November 10, 2025 10:36
@matthewwalsh0 matthewwalsh0 force-pushed the feat/metamask-pay-send-picker branch from 956a63d to efaa859 Compare November 10, 2025 12:17
@matthewwalsh0 matthewwalsh0 force-pushed the feat/metamask-pay-send-picker branch from 44194d4 to c264c90 Compare November 10, 2025 12:32
@matthewwalsh0 matthewwalsh0 added the skip-e2e skip E2E test jobs label Nov 10, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.86%. Comparing base (dddee92) to head (c264c90).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...iews/confirmations/components/send/asset/asset.tsx 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #22363    +/-   ##
========================================
  Coverage   77.86%   77.86%            
========================================
  Files        3826     3821     -5     
  Lines       98105    97840   -265     
  Branches    19236    19237     +1     
========================================
- Hits        76389    76187   -202     
+ Misses      16480    16416    -64     
- Partials     5236     5237     +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

@matthewwalsh0 matthewwalsh0 added this pull request to the merge queue Nov 10, 2025
auto-merge was automatically disabled November 10, 2025 14:35

Pull Request is not mergeable

Merged via the queue into main with commit 402fccb Nov 10, 2025
276 of 294 checks passed
@matthewwalsh0 matthewwalsh0 deleted the feat/metamask-pay-send-picker branch November 10, 2025 14:35
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.60.0 Issue or pull request that will be included in release 7.60.0 size-XL skip-e2e skip E2E test jobs team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants