Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
Ignoring alerts on:
|
| // noop? | ||
| } | ||
| if (request.method === 'wallet_createSession') { | ||
| await this.#mmConnect?.connect(['eip155:1'], []); |
There was a problem hiding this comment.
this probably isn't right. Should only be called in the connect method
| }, | ||
| }); | ||
|
|
||
| await this.#mmConnect?.connect(['eip155:1'], []); |
There was a problem hiding this comment.
Bug: Redundant Connection Interferes with Multi-Chain Support
The connect() method prematurely calls mmConnect.connect with hardcoded eip155:1 and empty accounts. This creates a redundant connection that conflicts with the wallet_createSession handler, which later connects with the actual user-requested scopes, potentially leading to an incorrect initial state and hindering multi-chain support.
|
@SocketSecurity ignore npm/@metamask/connect-multichain@0.1.0 this is us |
|
@SocketSecurity ignore npm/cross-fetch@4.1.0 expected |
|
@SocketSecurity ignore npm/protobufjs@7.5.4 |
|
@SocketSecurity ignore npm/@metamask/onboarding@1.0.1 I trust Mark |
Add MM Connect Integration
Note this does not work for the extension flow for some reason. We should refactor the overloaded extensionId for different entrypoints flow in subsequent PR
Uploading Screen Recording 2025-10-28 at 11.19.59 AM.mov…
Note
Integrates MetaMask Connect via a new provider, adds an MM Connect auto-connect UI button, and updates dependencies/config to support it.
MM_CONNECT_IDand updateSDK.setExtensionIdAndConnectto supportmm-connect.MetaMaskConnectProviderusing@metamask/connect-multichainfor connect, session, invoke, and notifications.src/App.tsxand importMM_CONNECT_ID.@metamask/connect-multichaintopackage.jsonand allow itsprotobufjsscript in LavaMoat.Written by Cursor Bugbot for commit 62c642a. This will update automatically on new commits. Configure here.