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

fix: update useHistoricalPrices getShouldShowFiat selector

Open Prithpal-Sooriya opened this issue 1 month ago • 1 comments

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry: show token charts when adding new network

Related issues

Fixes: #38298

Manual testing steps

See issue repro steps.

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] Update useHistoricalPrices to pass a hex chainId to getShouldShowFiat by converting CAIP IDs when needed.

  • UI Hooks (ui/pages/asset/hooks/useHistoricalPrices.ts):
    • Selector update: Call getShouldShowFiat(state, hexChainId) instead of a global selector.
    • Chain ID handling: Add toHexChainId helper and import convertCaipToHexChainId to convert CAIP chain IDs to hex before selector use.

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

Prithpal-Sooriya avatar Dec 10 '25 17:12 Prithpal-Sooriya

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 Dec 10 '25 17:12 github-actions[bot]

Builds ready [9f8fffe]
UI Startup Metrics (1268 ± 121 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12681023159612113391449
load1040857135910511141231
domContentLoaded1033851135110511081224
domInteractive2616109192280
firstPaint52289137340710141183
backgroundConnect21319326113218239
firstReactRender4530109154780
getState3717123203992
initialActions104112
loadScripts82865311241008941015
setupStore1172741219
numNetworkReqs1368320673
BrowserifyPower User HomeuiStartup18841392282018519722200
load1050868171313911331309
domContentLoaded1040860170413811261297
domInteractive3017137252598
firstPaint636112140339910131223
backgroundConnect255187809119229566
firstReactRender50389395469
getState20415069759221279
initialActions103112
loadScripts83967014621349211090
setupStore167221221337
numNetworkReqs71581462167135
WebpackStandard HomeuiStartup81167199075876934
load65357184275689815
domContentLoaded64756683674685810
domInteractive2516110192278
firstPaint21582774150205690
backgroundConnect136223221327
firstReactRender50311782853121
getState2814132163648
initialActions104112
loadScripts64456183474683806
setupStore1153151221
numNetworkReqs1368319668
WebpackPower User HomeuiStartup14231113177717815771747
load73758896899809919
domContentLoaded72958395798799910
domInteractive33181662828109
firstPaint36688942257643892
backgroundConnect908616142113586
firstReactRender53417165665
getState20115037142209327
initialActions102012
loadScripts72658095497796903
setupStore1594181437
numNetworkReqs71562232667137
FirefoxBrowserifyStandard HomeuiStartup14531158244421915251952
load1156957218616312021315
domContentLoaded1155957218616312021315
domInteractive8434108710795147
firstPaint------
backgroundConnect60202384782186
firstReactRender42327384660
getState157105141431
initialActions103122
loadScripts1123942211915711751284
setupStore175223281249
numNetworkReqs1567920975
BrowserifyPower User HomeuiStartup26301576390857030403566
load1580959265550120412480
domContentLoaded1579959265550120412479
domInteractive892896411085283
firstPaint------
backgroundConnect188281319246194972
firstReactRender5740103136186
getState1337340845157199
initialActions2033337
loadScripts1497944251246519122317
setupStore635103914961232
numNetworkReqs75571352273127
WebpackStandard HomeuiStartup16751365488137917452020
load13611150253616114011583
domContentLoaded13611150253616114011582
domInteractive96281348132115149
firstPaint------
backgroundConnect61232574363161
firstReactRender743629392884858
getState178149211561
initialActions103022
loadScripts13301135251215813711555
setupStore166113171558
numNetworkReqs1567921876
WebpackPower User HomeuiStartup27291799454658731553739
load18441151348951423212538
domContentLoaded18441151348851423212537
domInteractive2043211793201221002
firstPaint------
backgroundConnect143261100175188294
firstReactRender573897106374
getState1458031953181240
initialActions3049628
loadScripts17691133266846622382471
setupStore766109716860354
numNetworkReqs75551352467126
📊 Page Load Benchmark Results

Current Commit: 9f8fffe | Date: 12/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±44ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 719ms (±36ms) 🟢 | historical mean value: 717ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±12ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 44ms 1.01s 1.33s 1.07s 1.33s
domContentLoaded 719ms 36ms 699ms 997ms 742ms 997ms
firstPaint 77ms 12ms 60ms 180ms 84ms 180ms
firstContentfulPaint 77ms 12ms 60ms 180ms 84ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 58 Bytes (0%)
  • ui: 344 Bytes (0%)
  • common: -68 Bytes (0%)

metamaskbot avatar Dec 10 '25 18:12 metamaskbot