Skip to content

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Sep 10, 2025

Description

This PR aims to add feature flag for redesigned send flow for BIP44.

As new send flow will be relying on multichainAccountsState2 (aka BIP44), the centralised hook to determine redesigned send flow has also dependency to that flag. Please see useRedesignedSendFlow.ts

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

Related issues

Fixes: #35799

Manual testing steps

No user facing changes

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.

@OGPoyraz OGPoyraz requested review from a team as code owners September 10, 2025 12:04
@OGPoyraz OGPoyraz added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Sep 10, 2025
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Sep 10, 2025
@metamaskbot
Copy link
Collaborator

metamaskbot commented Sep 10, 2025

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (8 files, +286 -19)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 header/
              • 📄 wallet-initiated-header.test.tsx +4 -0
              • 📄 wallet-initiated-header.tsx +4 -2
        • 📁 hooks/
          • 📄 useConfirmSendNavigation.test.ts +68 -11
          • 📄 useConfirmSendNavigation.ts +4 -2
          • 📄 useRedesignedSendFlow.test.ts +157 -0
          • 📄 useRedesignedSendFlow.ts +41 -0
        • 📁 utils/
          • 📄 send.test.ts +6 -3
          • 📄 send.ts +2 -1

💎 @MetaMask/metamask-assets (1 files, +6 -1)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 assets/
          • 📁 nfts/
            • 📁 nft-details/
              • 📄 nft-details.tsx +6 -1

🧪 @MetaMask/qa (1 files, +16 -0)
  • 📁 test/
    • 📁 e2e/
      • 📄 mock-e2e.js +16 -0

🖥️ @MetaMask/wallet-ux (2 files, +10 -1)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 asset-picker-amount/
          • 📁 asset-picker-modal/
            • 📄 asset-picker-modal-nft-tab.tsx +3 -1
            • 📄 asset-picker-modal.test.tsx +7 -0

@OGPoyraz OGPoyraz requested a review from a team as a code owner September 10, 2025 12:23
Comment on lines +1009 to +1023
await server
.forGet('https://client-config.api.cx.metamask.io/v1/flags')
.thenCallback(() => {
return {
ok: true,
statusCode: 200,
json: [
{
sendRedesign: {
enabled: false,
},
},
],
};
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sendRedesign feature flag is currently used like a kill-switch. As we don't have redesigned send flow e2e tests for now, we want to disable the flow for all tests.

},
],
};
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Mock Conflicts Cause Unpredictable Test Results

There are now two conflicting mocks for the feature flags endpoint (https://client-config.api.cx.metamask.io/v1/flags). The original mock uses withQuery() for specific flags, while the new one matches all GET requests and returns different data. This creates unpredictable test behavior and may break existing tests that rely on the original feature flags.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not an issue if e2e tests passes - will wait and see

@OGPoyraz OGPoyraz changed the title [WIP] feat: Implement redesigned send flow feature flag feat: Implement redesigned send flow feature flag Sep 10, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: b49a20a | Date: 9/10/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.30s (±52ms) 🟡 | historical mean value: 1.31s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 980ms (±56ms) 🟢 | historical mean value: 986ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 91ms (±42ms) 🟢 | historical mean value: 96ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.30s 52ms 1.27s 1.76s 1.34s 1.76s
domContentLoaded 980ms 56ms 951ms 1.43s 1.02s 1.43s
firstPaint 91ms 42ms 72ms 484ms 128ms 484ms
firstContentfulPaint 91ms 42ms 72ms 484ms 128ms 484ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [b49a20a]
UI Startup Metrics (1260 ± 69 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1260112214766912971379
load109597413066611321216
domContentLoaded108796712806611261209
domInteractive18144561737
firstPaint58887121243110791147
backgroundConnect2552412828259274
firstReactRender23164852535
getState13594101527
initialActions51476517
loadScripts839717102664875955
setupStore951621014
WebpackHomeuiStartup20471493272923021912441
load16391212200117217191896
domContentLoaded16271201196017317131880
domInteractive171279111446
firstPaint1596247570182284
backgroundConnect4016356583399
firstReactRender103363329093324
getState2542845814262
initialActions11228238719
loadScripts16231198194817217111868
setupStore226420561338
FirefoxBrowserifyHomeuiStartup14351215192412514831714
load1235106915027912921370
domContentLoaded1235106915017912921370
domInteractive1013326245116213
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3520130193586
firstReactRender28227063039
getState62213613
initialActions5022022311
loadScripts1210105114797812681341
setupStore12518522851
WebpackHomeuiStartup15791374208216116841881
load13461175165313114521598
domContentLoaded13451174165213114511597
domInteractive108593035799296
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3222142133741
firstReactRender43368154550
getState8320020613
initialActions411321336
loadScripts13231157161913214291576
setupStore11517318919
Benchmark value 1260 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1095 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1087 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 256 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 839 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 1379 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1217 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1209 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 274 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 17 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 956 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 41 exceeds gate value 40 for chrome webpack home mean backgroundConnect
Benchmark value 12 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 99 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 262 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 19 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 1436 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 35 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 13 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1714 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 213 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 86 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 11 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 51 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 108 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 33 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 44 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 296 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 6 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 421ms | Sum of p95 exceeds: 710.8ms
Sum of all benchmark exceeds: 1131.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: 2.3 KiB (0.03%)
  • common: 10 Bytes (0%)

@OGPoyraz OGPoyraz added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit e966f98 Sep 10, 2025
151 of 152 checks passed
@OGPoyraz OGPoyraz deleted the ogp/35799 branch September 10, 2025 15:13
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2025
@metamaskbot metamaskbot added the release-13.4.0 Issue or pull request that will be included in release 13.4.0 label Sep 10, 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.4.0 Issue or pull request that will be included in release 13.4.0 size-M team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature-flag] Implement feature flag for BIP44 send flow
6 participants