Skip to content

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Oct 14, 2025

Description

Multiple small new send implementation related fixes.

Changelog

CHANGELOG entry:

Related issues

Fixes: #36787
Fixes: #36789
Fixes: #36757

Manual testing steps

  1. Trigger send flow
  2. Check the new amount recipient page

Screenshots/Recordings

TODO

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

Refines send flow by showing fiat currency code in Amount, exposing fiatCurrencyName, safely handling missing gas estimates for max amount, standardizing name-resolution error, and returning unique recipients (with tests and i18n updates).

  • Send Flow:
    • Amount input (ui/.../amount.tsx): Show fiat currency code when in fiat mode; uses fiatCurrencyName from useCurrencyConversions.
    • Currency conversions (useCurrencyConversions.ts): Expose fiatCurrencyName in hook return.
    • Max amount (useMaxAmount.ts): Gracefully handle missing gasFeeEstimates (default to 0) in getEstimatedTotalGas.
    • Name resolution (useNameValidation.ts): Use error: \nameResolutionFailedError`` for failed lookups.
    • Recipients (useRecipients.ts): Return accounts first and de-duplicate contacts by address.
  • i18n:
    • Add nameResolutionFailedError string to app/_locales/en/messages.json and en_GB/messages.json.
  • Tests:
    • Update Amount tests to use fiatCurrencySymbol: '$' and assert USD; add coverage for fiat toggle behavior.
    • Add test ensuring max amount does not throw when gas estimates are unavailable.
    • Update recipient tests for de-duplication and ordering.
    • Update recipient validation tests for new name resolution error key.

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

@jpuri jpuri requested a review from a team as a code owner October 14, 2025 05:44
@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 14, 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.

@jpuri jpuri enabled auto-merge October 14, 2025 05:44
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (9 files, +115 -21)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 send/
            • 📁 amount/
              • 📄 amount.test.tsx +23 -11
              • 📄 amount.tsx +4 -1
        • 📁 hooks/
          • 📁 send/
            • 📄 useCurrencyConversions.ts +1 -0
            • 📄 useMaxAmount.test.ts +26 -0
            • 📄 useMaxAmount.ts +2 -3
            • 📄 useNameValidation.ts +2 -2
            • 📄 useRecipients.test.ts +41 -0
            • 📄 useRecipients.ts +14 -2
            • 📄 useRecipientValidation.test.ts +2 -2

@metamaskbot
Copy link
Collaborator

❌ test-e2e-chrome-api-specs failed. View the html report here.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 6b1e9ae | Date: 10/14/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±71ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 728ms (±68ms) 🟢 | historical mean value: 739ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 71ms 1.00s 1.31s 1.25s 1.31s
domContentLoaded 728ms 68ms 694ms 993ms 929ms 993ms
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 [6b1e9ae]
UI Startup Metrics (1210 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1210108613966212481316
load104894912395910781162
domContentLoaded104294412345810721157
domInteractive18134871737
firstPaint69496124040910551146
backgroundConnect2502382747254265
firstReactRender24185362540
getState1053751120
initialActions40285415
loadScripts79770798558825914
setupStore85172913
WebpackHomeuiStartup856737110767877983
load64960293765660812
domContentLoaded64159592664651805
domInteractive171262101539
firstPaint22257903230194763
backgroundConnect22105172732
firstReactRender301783123460
getState942641017
initialActions2010237
loadScripts63859391562649794
setupStore942231013
FirefoxBrowserifyHomeuiStartup13791210176311314291585
load1185105914558412541321
domContentLoaded1185105814558412531320
domInteractive1003131351108233
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2818100103137
firstReactRender29247363036
getState729111520
initialActions30285216
loadScripts1163103714268112261294
setupStore9413815724
WebpackHomeuiStartup15761377223512616111860
load1359121816878313881546
domContentLoaded1358121816878313881544
domInteractive1053038064107302
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3220182183651
firstReactRender3827114143977
getState9215522628
initialActions509512221
loadScripts1333120115557713611527
setupStore14422626848
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 227 Bytes (0%)
  • common: 91 Bytes (0%)

@jpuri jpuri changed the title fix: cp-13.5.0, Send functionality related fixes fix: cp-13.5.0 Send functionality related fixes Oct 14, 2025
@jpuri jpuri added this pull request to the merge queue Oct 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2025
@jpuri jpuri added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit aed49b1 Oct 15, 2025
334 of 338 checks passed
@jpuri jpuri deleted the send_fix branch October 15, 2025 05:11
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2025
@metamaskbot metamaskbot added the release-13.6.0 Issue or pull request that will be included in release 13.6.0 label Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-13.6.0 Issue or pull request that will be included in release 13.6.0 size-M team-confirmations Push issues to confirmations team

Projects

None yet

4 participants