-
Notifications
You must be signed in to change notification settings - Fork 5.4k
release(runway): cherry-pick fix: restore institutional snap entrypoint cp-13.5.0 #36573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release(runway): cherry-pick fix: restore institutional snap entrypoint cp-13.5.0 #36573
Conversation
…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 -->
✨ Files requiring CODEOWNER review ✨🔑 @MetaMask/accounts-engineers (2 files, +61 -9)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [947c6f1]
UI Startup Metrics (1334 ± 75 ms)
|
@metamaskbot update-attributions |
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. |
No attributions changes |
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [21cebee]
UI Startup Metrics (1226 ± 58 ms)
|
|
||
const mockHistoryPush = jest.fn(); | ||
const mockOpenExtensionInBrowser = jest.fn(); | ||
const mockUseSelector = useSelector as jest.MockedFunction<typeof useSelector>; |
There was a problem hiding this comment.
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.
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [65cbf2a]
UI Startup Metrics (1229 ± 75 ms)
|
No release label on PR. Adding release label release-13.5.0 on PR, as PR was cherry-picked in branch 13.5.0. |
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
wallet
Screenshots/Recordings
Before
After
Pre-merge author checklist
Docs and MetaMask
Extension Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
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 bygetManageInstitutionalWallets
) and updates/extends tests accordingly.AddWalletModal
now conditionally includesmanageInstitutionalWallets
whenuseSelector(getManageInstitutionalWallets)
is true./snaps/view/${encodeURIComponent(INSTITUTIONAL_WALLET_SNAP_ID)}
.renderWithProvider
fromtest/lib/render-helpers
and mockreact-redux
useSelector
and i18n.addWallet
,importAWallet
, etc.).Written by Cursor Bugbot for commit 65cbf2a. This will update automatically on new commits. Configure here.
621846e