Skip to content

Conversation

@runway-github
Copy link
Contributor

@runway-github runway-github bot commented Aug 13, 2025

Description

Changes

  • patch bridge-controller and bridge-status-controller so that the
    effective gas fees for quotes are used for quote metadata calculations
  • show the totalNetworkFee instead of the totalMaxNetworkFee in the
    QuoteCard for accuracy
  • fix the token alert scanning payload for optimism (typo)

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

Related issues

Fixes: #35006

Manual testing steps

  1. Get an EVM swap quote
  2. The quoted network fee should be close to the swap fees on mobile or
    other aggregators
  3. Get an EVM bridge quote
  4. The quoted network fee should be close to the fees from other
    aggregators
  5. Get a solana swap quote
  6. The quoted network fee should be close to the fees from other
    aggregators

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. b58539e

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

Changes
- patch bridge-controller and bridge-status-controller so that the
effective gas fees for quotes are used for quote metadata calculations
- show the `totalNetworkFee` instead of the `totalMaxNetworkFee` in the
QuoteCard for accuracy
- fix the token alert scanning payload for optimism (typo)

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/35038?quickstart=1)

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

Fixes: #35006

1. Get an EVM swap quote
2. The quoted network fee should be close to the swap fees on mobile or
other aggregators
3. Get an EVM bridge quote
2. The quoted network fee should be close to the fees from other
aggregators
3. Get a solana swap quote
2. The quoted network fee should be close to the fees from other
aggregators

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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.
@runway-github runway-github bot requested a review from a team as a code owner August 13, 2025 17:07
@metamaskbot metamaskbot added the team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead label Aug 13, 2025
@socket-security
Copy link

socket-security bot commented Aug 13, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​multichain-network-controller@​0.11.0 ⏵ 0.11.1981007497 +1100
Updated@​metamask/​controller-utils@​11.11.0 ⏵ 11.12.098 +11007596 +5100
Updated@​metamask/​bridge-status-controller@​37.0.0 ⏵ 38.0.19710075 +1100 +1100
Updated@​metamask/​bridge-controller@​37.0.0 ⏵ 39.0.19610076 +1100 +1100

View full report

@metamaskbot metamaskbot requested review from a team as code owners August 13, 2025 17:15
@metamaskbot
Copy link
Collaborator

metamaskbot commented Aug 13, 2025

✨ Files requiring CODEOWNER review ✨

🧩 @MetaMask/extension-devs (4 files, +108 -12)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +27 -3
      • 📁 experimental/
        • 📄 policy.json +27 -3
      • 📁 flask/
        • 📄 policy.json +27 -3
      • 📁 main/
        • 📄 policy.json +27 -3

📜 @MetaMask/policy-reviewers (4 files, +108 -12)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +27 -3
      • 📁 experimental/
        • 📄 policy.json +27 -3
      • 📁 flask/
        • 📄 policy.json +27 -3
      • 📁 main/
        • 📄 policy.json +27 -3

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.


🔗 @MetaMask/supply-chain (4 files, +108 -12)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +27 -3
      • 📁 experimental/
        • 📄 policy.json +27 -3
      • 📁 flask/
        • 📄 policy.json +27 -3
      • 📁 main/
        • 📄 policy.json +27 -3

🔄 @MetaMask/swaps-engineers (6 files, +72 -24)
  • 📁 shared/
    • 📁 lib/
      • 📁 bridge/
        • 📄 metrics.ts +1 -1
  • 📁 test/
    • 📁 data/
      • 📁 bridge/
        • 📄 mock-bridge-store.ts +5 -2
  • 📁 ui/
    • 📁 ducks/
      • 📁 bridge/
        • 📄 selectors.test.ts +45 -18
    • 📁 pages/
      • 📁 bridge/
        • 📁 quotes/
          • 📄 bridge-quote-card.tsx +3 -0
          • 📄 bridge-quotes-modal.tsx +11 -1
          • 📄 multichain-bridge-quote-card.tsx +7 -2

cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

Builds ready [4bd6992]
UI Startup Metrics (1178 ± 74 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1178106114607412071311
load100188612776910251128
domContentLoaded99387612636910131119
domInteractive17143941726
firstPaint624155123840310161107
backgroundConnect2192092517221236
firstReactRender20133242230
getState1154071425
initialActions2053526
loadScripts781673105769803906
setupStore74152811
WebpackHomeuiStartup22411631269218723192583
load16961196200314817621904
domContentLoaded16891193199514717541887
domInteractive1811115181473
firstPaint1685950878192350
backgroundConnect2811186203065
firstReactRender1919240394185382
getState3642978011279
initialActions5221369
loadScripts16851190198314617491876
setupStore157294291424
FirefoxBrowserifyHomeuiStartup13111134175610113621470
load113099613737911961262
domContentLoaded112999613737911961262
domInteractive983431352103218
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect27176383042
firstReactRender24205462236
getState8215416528
initialActions30314212
loadScripts110998313557811781246
setupStore1038813637
WebpackHomeuiStartup16381354306119916891975
load13521116171311314271545
domContentLoaded13521116171311314271545
domInteractive97302734899241
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2820117113241
firstReactRender57436966167
getState94306926
initialActions30244215
loadScripts13311099168511114081527
setupStore11416120826
Benchmark value 220 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 237 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 6 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2241 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 36 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2584 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 74 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 350 exceeds gate value 334 for chrome webpack home p95 firstPaint
Benchmark value 382 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 279 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 218 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 28 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 37 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1638 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 29 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 57 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1975 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 241 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 67 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 15 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 320ms | Sum of p95 exceeds: 686.8ms
Sum of all benchmark exceeds: 1006.8ms

@github-actions
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

Builds ready [579e7b0]
UI Startup Metrics (1183 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1183106813726112201296
load100488811535510411104
domContentLoaded99688011465610351096
domInteractive18145361733
firstPaint667106115040610191101
backgroundConnect2192062507222232
firstReactRender19143542030
getState12593101726
initialActions30731026
loadScripts78567394156826889
setupStore85273812
WebpackHomeuiStartup23241700283520224442684
load17441226214915218131988
domContentLoaded17361222213614918041967
domInteractive1912203231465
firstPaint1696451169196297
backgroundConnect311582153769
firstReactRender23990415121381403
getState2743136113251
initialActions11229434722
loadScripts17311220212514818011954
setupStore226302451734
FirefoxBrowserifyHomeuiStartup13081133165410013701470
load112899513787611831249
domContentLoaded112899513777611831249
domInteractive973328144110206
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect271670103055
firstReactRender23195352230
getState726710625
initialActions30235314
loadScripts110898013607511651223
setupStore10318721733
WebpackHomeuiStartup16611423208114417532001
load13761139176412214601563
domContentLoaded13761139176412214601562
domInteractive102323505998260
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect30206383446
firstReactRender60489396677
getState1144881228
initialActions40215315
loadScripts13541117174512214321541
setupStore1056510835
Benchmark value 219 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 232 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 6 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2324 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1745 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1736 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 240 exceeds gate value 235 for chrome webpack home mean firstReactRender
Benchmark value 11 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 1732 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2684 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 66 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 403 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 251 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 22 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 206 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 25 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 14 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 33 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1661 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 102 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 60 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 2001 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 260 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 77 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 15 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 35 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 536ms | Sum of p95 exceeds: 808.8ms
Sum of all benchmark exceeds: 1344.8ms

@gauthierpetetin
Copy link
Contributor

Thank you for resolving the conflicts @micaelae. I reviewed the cherry-pick PR and it looks good overall, but I noticed something.
We’re not using the same package versions in the PR vs. the cherry-pick PR:

  • @metamask/bridge-controller: 39.0.0 in the PR vs. 39.0.1 in the cherry-pick PR
  • @metamask/bridge-status-controller: 38.0.0 in the PR vs. 38.0.1 in the cherry-pick PR

As a result, this changes several dependencies in yarn.lock (@metamask/controller-utils, @metamask/keyring-api, @metamask/keyring-internal-api), as well as the LavaMoat files.
I wonder if it is ok to use different versions in cherry-pick PR, or if we should align them with the original PR to avoid divergence between the release branch and main.

I posted a message on Slack to clarify that and will report back here once I have the answer.

@metamaskbot
Copy link
Collaborator

Builds ready [d467460]
UI Startup Metrics (1233 ± 77 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1233111715377712731395
load104291812867710731215
domContentLoaded103391012797810651209
domInteractive18153941829
firstPaint66981122441210381112
backgroundConnect2242092457228239
firstReactRender21154062338
getState1053461225
initialActions30698311
loadScripts817700106077853985
setupStore85263911
WebpackHomeuiStartup22191678265517323002500
load16721130199714717461860
domContentLoaded16651125196114517361841
domInteractive1811120171454
firstPaint1615839664196268
backgroundConnect261471122956
firstReactRender20589409104331393
getState3544008112277
initialActions5222368
loadScripts16611123195014417331831
setupStore146226221425
FirefoxBrowserifyHomeuiStartup1316114017029713781479
load113999214838711971271
domContentLoaded113999214828711971271
domInteractive1023424543112199
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2717108113140
firstReactRender24205362339
getState728310523
initialActions40498222
loadScripts111997614658611761241
setupStore83488632
WebpackHomeuiStartup15601347188313416471817
load13011087160812113921529
domContentLoaded13011087160812113921528
domInteractive95322814996239
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect27195663039
firstReactRender55407065965
getState84286824
initialActions5110616315
loadScripts12811069158812013731506
setupStore95748822
Benchmark value 225 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 1396 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1216 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1210 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 239 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 11 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 985 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2220 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 35 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2500 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 393 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 277 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 8 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 28 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 199 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 22 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 32 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 27 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 55 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 239 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 65 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 15 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 282ms | Sum of p95 exceeds: 654.8ms
Sum of all benchmark exceeds: 936.8ms

@gauthierpetetin
Copy link
Contributor

Replaced by #35112

@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2025
@HowardBraham HowardBraham deleted the cherry-pick-13-1-0-b58539e branch December 13, 2025 02:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants