Skip to content

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Oct 17, 2025

Description

redesigned send add filtering by chainId in address book contacts

Changelog

CHANGELOG entry:

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6041

Manual testing steps

  1. Go to recipient input in new send flow
  2. Check that contacts are filtered by chainId of the asset

Screenshots/Recordings

Screenshot 2025-10-17 at 4 33 58 PM

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

Filters EVM contact recipients by current chainId from send context and updates tests to reflect chain-scoped contacts.

  • Hooks:
    • Update ui/pages/confirmations/hooks/send/useContactRecipients.ts to:
      • Use useSendContext chainId and return contacts only when isEvmSendType.
      • Filter address book by contact.chainId === chainId (removes isAddress-based filtering).
      • Memoize computed contacts with useMemo.
  • Tests:
    • Adjust ui/pages/confirmations/hooks/send/useContactRecipients.test.ts to mock useSendContext and assert chainId-filtered EVM contacts; remove non-EVM address checks and update expected results (including seedIcon).

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

@jpuri jpuri requested a review from a team as a code owner October 17, 2025 11:05
@jpuri jpuri added team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Oct 17, 2025
Copy link
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.

@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (2 files, +30 -27)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 hooks/
          • 📁 send/
            • 📄 useContactRecipients.test.ts +9 -6
            • 📄 useContactRecipients.ts +21 -21

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 900aea3 | Date: 10/17/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±72ms) 🟡 | historical mean value: 1.06s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 727ms (±68ms) 🟢 | historical mean value: 743ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 72ms 990ms 1.30s 1.24s 1.30s
domContentLoaded 727ms 68ms 690ms 986ms 934ms 986ms
firstPaint 75ms 11ms 60ms 168ms 84ms 168ms
firstContentfulPaint 75ms 11ms 60ms 168ms 84ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [900aea3]
UI Startup Metrics (1265 ± 66 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1265114614666613101400
load108598312346011281220
domContentLoaded107797812285911171211
domInteractive19145381741
firstPaint69991123444011021170
backgroundConnect25924240818261283
firstReactRender2717114112743
getState16694112033
initialActions70458827
loadScripts82672798258868960
setupStore1163751124
WebpackHomeuiStartup824703106263841967
load62357690660634751
domContentLoaded61557189759627735
domInteractive15114981338
firstPaint19154859185193707
backgroundConnect2194472634
firstReactRender271769103149
getState931531113
initialActions3010246
loadScripts61356988656625724
setupStore951621114
FirefoxBrowserifyHomeuiStartup14111232196610714661573
load1203105614067212631306
domContentLoaded1203105614067212631306
domInteractive1103133451115232
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32208493645
firstReactRender25206152634
getState84486820
initialActions6118420310
loadScripts1182104113897112391288
setupStore115100121042
WebpackHomeuiStartup15481335188810516071743
load1323118015008313821468
domContentLoaded1322117915008313821468
domInteractive92293675395203
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect352190134065
firstReactRender3626149173577
getState10512414924
initialActions41143412
loadScripts1299116514808013591443
setupStore136136171035
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 9.7 KiB (0.15%)
  • common: 1.07 KiB (0.01%)

@jpuri jpuri enabled auto-merge October 17, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants