-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
feat: SIP-26 Integration #29887
feat: SIP-26 Integration #29887
Conversation
<!-- 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. --> ## **Description** This link was pointing to a dead site, this fixes it to point to the correct URL. [](https://codespaces.new/MetaMask/metamask-extension/pull/29733?quickstart=1) ## **Related issues** N/A ## **Manual testing steps** 1. Go to https://github.com/MetaMask/metamask-extension/blob/develop/docs/README.md 2. Click the link to Developer Docs ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **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 - [ ] 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. ## **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.
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 update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
All alerts resolved. Learn more about Socket for GitHub ↗ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
❌ API Spec Test Failed. View the report here. |
❌ Multichain API Spec Test Failed. View the report here. |
❌ API Spec Test Failed. View the report here. |
❌ Multichain API Spec Test Failed. View the report here. |
A couple of notes:
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub ↗.
|
Builds ready [552e273]
Page Load Metrics (1671 ± 105 ms)
|
Builds ready [c6b5bc7]
Page Load Metrics (1912 ± 62 ms)
|
Per @mcmire 's comment above
In order to test with solana you will need to:
|
Builds ready [547fb5d]
Page Load Metrics (1874 ± 126 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [21627b6]
Page Load Metrics (1751 ± 85 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
app/scripts/lib/rpc-method-middleware/handlers/wallet-createSession/handler.ts
Outdated
Show resolved
Hide resolved
<!-- 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. --> ## **Description** <!-- 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? --> [](https://codespaces.new/MetaMask/metamask-extension/pull/31736?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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. ## **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.
Attempt to address [some concerns about time complexity raised by @FrederikBolding](#29887 (comment)) rename and reorganize these helpers for easier navigation. I have [an open PR against core here](MetaMask/core#5609) where I've made the improvements + name changes that can be reviewed and merged immediately after 12.17.0 cut
const supportedRequestedAccounts = requestedCaipAccountIds.reduce( | ||
(acc, account) => { | ||
const supportedRequestedAccount = | ||
supportedAccountsForRequestedNamespaces.find( |
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.
Could these be EIP155 addresses that should be compared without casing? Just wondering if this might cause a bug in the EVM flow
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.
Yeah I considered this and thought it wasn't an issue, but I think it may be so I'll add that check for EVM addresses only
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.
The consequences here are pretty low, it would just mean a requested account (rare that specific accounts are requested at all) wouldn't get default pre-checked in case mismatch
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.
Yeah, but seems worth it to make sure since we specifically added this for certain dapps that asked for it 😄
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.
Probably not for now, but perhaps worth considering in the future to move some of this to a more shared place. So we don't have multiple implementations of checking for EIP155 etc
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.
done here: bc2852a
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.
LGTM!
Builds ready [308b7ce]
UI Startup Metrics (1219 ± 70 ms)
|
13492c2
Builds ready [13492c2]
UI Startup Metrics (1239 ± 56 ms)
|
General Testing:
Screen.Recording.2025-04-03.at.5.00.51.PM.mov
Related issues
Ticket: https://github.com/orgs/MetaMask/projects/146/views/6?pane=issue&itemId=94617458&issue=MetaMask%7CMetaMask-planning%7C3989
Upstream Extension: #27782
Core: MetaMask/core#5191
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist