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

fix: fixed ENS Resolution for selected chain in contacts

Open NidhiKJha opened this issue 1 month ago • 2 comments

This PR is to ensure if ENS is supported on that network, it should resolve to their corresponding address in that network

Changelog

CHANGELOG entry:null

Related issues

Fixes: #34994

Manual testing steps

  1. Click Contacts
  2. Select Mainnet
  3. Add seaona.eth see address
  4. Select Sepolia
  5. Add seaona.eth see address is different

Screenshots/Recordings

Before

NA

After

https://github.com/user-attachments/assets/15d851b1-7617-4208-9672-2ce73aa9ac93

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] Re-resolves ENS/domain names on network change in Add Contact by tracking the entered domain and invoking lookupDomainName with the selected chain, with container wiring and minor fixes.

  • Contacts UI (ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js):
    • Add re-resolution logic on network change:
      • Track original domain via enteredDomainName and previous chain via useRef.
      • On selectedChainId change, reset resolutions and call lookupDomainName(domain, selectedChainId).
    • Update domain resolution selection:
      • On selecting a resolution, set enteredDomainName and clear existing resolutions.
    • Reset flow: clear enteredDomainName on input reset.
    • Network picker: normalize onSelect param to chainId.
    • Props: add lookupDomainName to PropTypes.
  • Container (add-contact.container.js):
    • Wire lookupDomainName(domainName, chainId) from ducks/domains into component props.

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

NidhiKJha avatar Dec 09 '25 10:12 NidhiKJha

Builds ready [a81e87f]
UI Startup Metrics (1242 ± 81 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1242106914508113141366
load102186411966410621119
domContentLoaded101686111836410561111
domInteractive21156172136
firstPaint4448212013769651105
backgroundConnect21319826812216237
firstReactRender483283135574
getState3915124214690
initialActions104112
loadScripts80966297463849906
setupStore1273241421
numNetworkReqs86337630
BrowserifyPower User HomeuiStartup19321648282015120202125
load110493412708811751259
domContentLoaded109392912638811651244
domInteractive281784112953
firstPaint53794126942510811236
backgroundConnect263207667105246612
firstReactRender50417165262
getState20114735138221272
initialActions102111
loadScripts8737181047869391021
setupStore16114261532
numNetworkReqs67581071166101
WebpackStandard HomeuiStartup847716112973878995
load65857094571695812
domContentLoaded65356394171690807
domInteractive22155072238
firstPaint22376729170195670
backgroundConnect1364281331
firstReactRender56342093754147
getState24156993142
initialActions103112
loadScripts64956093571688804
setupStore1062741119
numNetworkReqs86306629
WebpackPower User HomeuiStartup14851197236218016251757
load73560793891819901
domContentLoaded72860193190809892
domInteractive261682112754
firstPaint26489917183244711
backgroundConnect57755312732523
firstReactRender50398565262
getState19713842250229309
initialActions103011
loadScripts72459992890805889
setupStore1593971435
numNetworkReqs6658101106697
FirefoxBrowserifyStandard HomeuiStartup12831113177013513571599
load1053939148210710961337
domContentLoaded1053939148210710931337
domInteractive58321753083131
firstPaint------
backgroundConnect4220292364390
firstReactRender3730104103759
getState962121012
initialActions102122
loadScripts102591714599810491273
setupStore967971013
numNetworkReqs86255724
BrowserifyPower User HomeuiStartup26051611395957030663344
load1567998248953021232322
domContentLoaded1567994248953021222321
domInteractive152311206294771009
firstPaint------
backgroundConnect148261093175171270
firstReactRender5635101146091
getState1407633550171252
initialActions206123
loadScripts1513955244050220262285
setupStore504108612930287
numNetworkReqs68541321567114
WebpackStandard HomeuiStartup15171296186210915721752
load1241109415047612971380
domContentLoaded1241109415047612971380
domInteractive65301973885140
firstPaint------
backgroundConnect44191752348101
firstReactRender42338494560
getState167203251425
initialActions103122
loadScripts1218107914247212771353
setupStore1162741219
numNetworkReqs86265723
WebpackPower User HomeuiStartup28021759462364033163574
load18771116363558223972615
domContentLoaded18761116363558223962614
domInteractive2512818104251021107
firstPaint------
backgroundConnect1782511862561881046
firstReactRender56351411759104
getState1388027647172241
initialActions3069823
loadScripts17821100336653622432579
setupStore4343557133258
numNetworkReqs70531361868120
📊 Page Load Benchmark Results

Current Commit: a81e87f | Date: 12/9/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±42ms) 🟡 | historical mean value: 1.06s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 713ms (±39ms) 🟢 | historical mean value: 738ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 74ms (±11ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 42ms 1.00s 1.32s 1.05s 1.32s
domContentLoaded 713ms 39ms 693ms 982ms 726ms 982ms
firstPaint 74ms 11ms 60ms 168ms 84ms 168ms
firstContentfulPaint 74ms 11ms 60ms 168ms 84ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 468 Bytes (0.01%)
  • common: 20 Bytes (0%)

metamaskbot avatar Dec 09 '25 11:12 metamaskbot

Builds ready [c44b0b4]
UI Startup Metrics (1265 ± 78 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1265104914747813211396
load103787512506910801138
domContentLoaded103186912446810721134
domInteractive23165782440
firstPaint58780117741410521107
backgroundConnect21919624810226239
firstReactRender463394114969
getState3416122174074
initialActions103111
loadScripts819666104267860918
setupStore1182631221
numNetworkReqs86307629
BrowserifyPower User HomeuiStartup19721654252818420642406
load1116951133210112041282
domContentLoaded1105942132710111981272
domInteractive28185682946
firstPaint581128130842310801254
backgroundConnect275211883122258630
firstReactRender52419475562
getState20015028228218256
initialActions102112
loadScripts8767051106989591044
setupStore16116671631
numNetworkReqs71592062567110
WebpackStandard HomeuiStartup840717102464878956
load65457284663693792
domContentLoaded64956884063687786
domInteractive22155172238
firstPaint22472785162204646
backgroundConnect1153371327
firstReactRender56322044147163
getState24135593141
initialActions103111
loadScripts64556583763685783
setupStore1062841217
numNetworkReqs86337629
WebpackPower User HomeuiStartup15391213262820016501877
load764624118399852908
domContentLoaded756618117698846902
domInteractive2716101122648
firstPaint29889902228263822
backgroundConnect43762611021324
firstReactRender51427365567
getState21114933746245312
initialActions103112
loadScripts753615116698843899
setupStore1574271436
numNetworkReqs6858204166794
FirefoxBrowserifyStandard HomeuiStartup13481140181012814371559
load1106955156710211551333
domContentLoaded1105954156710211541333
domInteractive69332473888144
firstPaint------
backgroundConnect4023132204686
firstReactRender3931149134053
getState1063651024
initialActions102122
loadScripts108093515019611191298
setupStore126162161122
numNetworkReqs86286725
BrowserifyPower User HomeuiStartup26381604357560431393430
load1653973260355221372437
domContentLoaded1653973260255221362436
domInteractive9831108619375150
firstPaint------
backgroundConnect1862314602402151021
firstReactRender5538110125972
getState1527342359169246
initialActions219123
loadScripts1560955238250620492299
setupStore685111316339357
numNetworkReqs70561261472109
WebpackStandard HomeuiStartup15111293186111915751766
load1222112015256912781346
domContentLoaded1222111915256912781346
domInteractive51272493576110
firstPaint------
backgroundConnect48191642948119
firstReactRender433291104558
getState177197281434
initialActions103122
loadScripts1200110114986812551323
setupStore134107141228
numNetworkReqs86275724
WebpackPower User HomeuiStartup27371834358855831893446
load18451118267149522732448
domContentLoaded18451118267049522732448
domInteractive186281133334781017
firstPaint------
backgroundConnect162251190221173958
firstReactRender58391091758102
getState1297233750154235
initialActions207123
loadScripts17681103249447422072415
setupStore194368381953
numNetworkReqs71581141270100
📊 Page Load Benchmark Results

Current Commit: c44b0b4 | Date: 12/9/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.10s (±117ms) 🟡 | historical mean value: 1.06s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 787ms (±114ms) 🟢 | historical mean value: 741ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±10ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.10s 117ms 1.02s 1.34s 1.32s 1.34s
domContentLoaded 787ms 114ms 703ms 1.02s 998ms 1.02s
firstPaint 78ms 10ms 60ms 164ms 88ms 164ms
firstContentfulPaint 78ms 10ms 60ms 164ms 88ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 504 Bytes (0.01%)
  • common: 20 Bytes (0%)

metamaskbot avatar Dec 09 '25 12:12 metamaskbot