Skip to content

Conversation

runway-github[bot]
Copy link
Contributor

@runway-github runway-github bot commented Oct 3, 2025

Description

The "Manage Institutional Wallets" entrypoint would have been missing
from the 13.5.0 release with the activation of BIP-44 state 2, which
would deprive users of the ability to onboard.

This PR adds it back. It should be cherry-picked to the release.

Changelog

CHANGELOG entry: Add "Manage Institutional Wallet" to the new add wallet
modal

Related issues

Fixes: #36615
https://consensyssoftware.atlassian.net/browse/MUL-866

Manual testing steps

  1. Go to advanced settings
  2. Enable "Manage institutional wallets"
  3. See that the option is now there when you go to account list / add
    wallet

Screenshots/Recordings

Before

Screenshot 2025-10-03 at 10 27 34

After

Screenshot 2025-10-03 at 10 27 16

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

Adds a conditional "Manage Institutional Wallets" option to AddWalletModal (driven by getManageInstitutionalWallets) and updates/extends tests accordingly.

  • UI
    • AddWalletModal now conditionally includes manageInstitutionalWallets when useSelector(getManageInstitutionalWallets) is true.
    • Institutional option routes to /snaps/view/${encodeURIComponent(INSTITUTIONAL_WALLET_SNAP_ID)}.
  • Tests
    • Switch to renderWithProvider from test/lib/render-helpers and mock react-redux useSelector and i18n.
    • Expectations updated to translation keys (addWallet, importAWallet, etc.).
    • New cases verify institutional option hidden/shown based on selector.

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

621846e

…nt cp-13.5.0 (#36345)

## **Description**

The "Manage Institutional Wallets" entrypoint would have been missing
from the 13.5.0 release with the activation of BIP-44 state 2, which
would deprive users of the ability to onboard.

This PR adds it back. It should be cherry-picked to the release.

## **Changelog**

CHANGELOG entry: Add "Manage Institutional Wallet" to the new add wallet
modal

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MUL-866

## **Manual testing steps**

1. Go to advanced settings
2. Enable "Manage institutional wallets"
3. See that the option is now there when you go to account list / add
wallet

## **Screenshots/Recordings**


### **Before**

<img width="412" height="612" alt="Screenshot 2025-10-03 at 10 27 34"
src="https://github.com/user-attachments/assets/cbb0c6fa-4d5f-47f9-aa74-72f1c0a0277e"
/>

### **After**

<img width="412" height="612" alt="Screenshot 2025-10-03 at 10 27 16"
src="https://github.com/user-attachments/assets/b0abc025-028b-4803-b439-95569705c736"
/>

## **Pre-merge author checklist**

- [X] 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).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] 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.

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds a conditional "Manage Institutional Wallets" option to
AddWalletModal (via Redux selector) routing to the institutional snap,
with updated and expanded tests.
> 
> - **UI**:
> - **AddWalletModal**: Conditionally appends `institutional-wallet`
option when `getManageInstitutionalWallets` is true; routes to
`/snaps/view/${encodeURIComponent(INSTITUTIONAL_WALLET_SNAP_ID)}`.
> - **Tests**:
> - Mock `react-redux` `useSelector` and i18n; switch to new
`renderWithProvider` helper.
> - Update assertions to translation keys and add coverage for
institutional option visibility (enabled/disabled).
>   - Preserve hardware wallet expanded-view navigation behavior.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3e1fa21. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@runway-github runway-github bot requested a review from a team as a code owner October 3, 2025 14:57
@metamaskbot metamaskbot added the team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead label Oct 3, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (2 files, +61 -9)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain-accounts/
        • 📁 add-wallet-modal/
          • 📄 add-wallet-modal.test.tsx +43 -9
          • 📄 add-wallet-modal.tsx +18 -0

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 947c6f1 | Date: 10/3/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±70ms) 🟡 | historical mean value: 1.06s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±68ms) 🟢 | historical mean value: 741ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±13ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 70ms 1.01s 1.32s 1.26s 1.32s
domContentLoaded 732ms 68ms 697ms 997ms 942ms 997ms
firstPaint 75ms 13ms 60ms 188ms 88ms 188ms
firstContentfulPaint 75ms 13ms 60ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [947c6f1]
UI Startup Metrics (1334 ± 75 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1334117614917513921456
load115299213067312061273
domContentLoaded114098213017611991263
domInteractive19145171941
firstPaint71292131247011631262
backgroundConnect27825942926279301
firstReactRender281796123046
getState1354371632
initialActions50537616
loadScripts8747211030759241002
setupStore1164461122
WebpackHomeuiStartup19991486275730322132476
load16121195216224018091972
domContentLoaded16021186212723518041935
domInteractive1811120171462
firstPaint1706640467192292
backgroundConnect3411414473073
firstReactRender81353385582223
getState2752786114265
initialActions7217017616
loadScripts15981184211223418011926
setupStore175314431222
FirefoxBrowserifyHomeuiStartup14391221188812414921673
load1240106015338813101375
domContentLoaded1239106015338813091375
domInteractive1103539057114241
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3220170173553
firstReactRender29247253035
getState73636714
initialActions4150538
loadScripts1213104415088512821335
setupStore14521930947
WebpackHomeuiStartup15881369212415016831879
load13491163163712814391607
domContentLoaded13491163163712814381606
domInteractive104323286099299
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3420230223743
firstReactRender3931149124145
getState8221321610
initialActions3113238
loadScripts13231146161612714161582
setupStore12513316928

@gauthierpetetin
Copy link
Contributor

@metamaskbot update-attributions

Copy link
Contributor

github-actions bot commented Oct 7, 2025

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

No attributions changes

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 21cebee | Date: 10/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±71ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 738ms (±69ms) 🟢 | historical mean value: 736ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±11ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 71ms 1.02s 1.32s 1.27s 1.32s
domContentLoaded 738ms 69ms 705ms 1.00s 947ms 1.00s
firstPaint 78ms 11ms 60ms 176ms 84ms 176ms
firstContentfulPaint 78ms 11ms 60ms 176ms 84ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [21cebee]
UI Startup Metrics (1226 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1226110213555812671324
load106095012075310971142
domContentLoaded105294411955310891132
domInteractive17134351628
firstPaint69286119942110711128
backgroundConnect2522382838255268
firstReactRender23164452337
getState1253161525
initialActions50446516
loadScripts80770494351841883
setupStore952831014
WebpackHomeuiStartup20161561252427222012484
load16241255206820617511936
domContentLoaded16161252206420617451933
domInteractive181297141452
firstPaint1696355176211323
backgroundConnect3117330323157
firstReactRender95363348287325
getState195320471427
initialActions62264614
loadScripts16121250205420517411931
setupStore225309551335
FirefoxBrowserifyHomeuiStartup14721232198212215521684
load1264107915398813441391
domContentLoaded1264107815398813441391
domInteractive1053541456110243
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3320107163679
firstReactRender30245443138
getState11322629718
initialActions4126346
loadScripts1239106115148813231368
setupStore1067910929
WebpackHomeuiStartup15771349195213816751832
load13491143159811914331558
domContentLoaded13481143159811914331557
domInteractive1013232456103282
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect29194673640
firstReactRender38315244047
getState63273612
initialActions31324310
loadScripts13271127157312014121538
setupStore95374920


const mockHistoryPush = jest.fn();
const mockOpenExtensionInBrowser = jest.fn();
const mockUseSelector = useSelector as jest.MockedFunction<typeof useSelector>;
Copy link

Choose a reason for hiding this comment

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

Bug: Mocking Issue with useSelector in Tests

The mockUseSelector variable is assigned to the original useSelector function before react-redux is mocked. As a result, mockUseSelector doesn't control the useSelector instance the component receives, leading to tests that rely on it not working as intended.

Fix in Cursor Fix in Web

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 65cbf2a | Date: 10/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±69ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±67ms) 🟢 | historical mean value: 736ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±13ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 69ms 1.01s 1.31s 1.24s 1.31s
domContentLoaded 731ms 67ms 699ms 995ms 926ms 995ms
firstPaint 76ms 13ms 60ms 184ms 88ms 184ms
firstContentfulPaint 76ms 13ms 60ms 184ms 88ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [65cbf2a]
UI Startup Metrics (1229 ± 75 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1229110114417512771396
load106295112426811061205
domContentLoaded105593912346810981197
domInteractive17134461635
firstPaint698147121742110591181
backgroundConnect2542392808256274
firstReactRender23185052434
getState1358091527
initialActions50649616
loadScripts80868098767840944
setupStore96232914
WebpackHomeuiStartup19361491254929522062429
load15591194195922617321914
domContentLoaded15521188195522517291908
domInteractive171283131549
firstPaint1616238563184295
backgroundConnect3014316302948
firstReactRender85363336378291
getState2752976413271
initialActions52244516
loadScripts15481185194422317261897
setupStore155298341222
FirefoxBrowserifyHomeuiStartup14411200206713115031638
load1244104515569913151423
domContentLoaded1244104515559913151423
domInteractive1113136562114275
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3320233243452
firstReactRender28246052936
getState73527717
initialActions4256649
loadScripts1220102214569512871405
setupStore12419321936
WebpackHomeuiStartup15651351198115516611912
load13281164163412414001557
domContentLoaded13281164163412414001557
domInteractive1033332960100305
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect30195273541
firstReactRender36314933843
getState63122710
initialActions501251736
loadScripts13051140161312513821534
setupStore11613515921

@gauthierpetetin gauthierpetetin merged commit 50c1c1e into release/13.5.0 Oct 7, 2025
144 of 145 checks passed
@gauthierpetetin gauthierpetetin deleted the runway-cherry-pick-13.5.0-1759503429 branch October 7, 2025 12:33
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2025
@metamaskbot metamaskbot added the release-13.5.0 Issue or pull request that will be included in release 13.5.0 label Oct 7, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-13.5.0 on PR, as PR was cherry-picked in branch 13.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.5.0 Issue or pull request that will be included in release 13.5.0 team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants