feat: full sdk persistence and protocol upgrade
Description
Related issues
Fixes:
Manual testing steps
- Go to this page...
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] 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 format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). 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.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/@metamask/[email protected] | None | +2 |
7.61 MB | |
| npm/@walletconnect/[email protected] | Transitive: network | +20 |
3.64 MB | bkrem |
| npm/@walletconnect/[email protected] | Transitive: environment, filesystem, network, shell, unsafe | +54 |
16.5 MB | |
| npm/@walletconnect/[email protected] | None | 0 |
90.9 kB | gancho_walletconnect |
| npm/@walletconnect/[email protected] | None | +1 |
164 kB | gancho_walletconnect |
| npm/@walletconnect/[email protected] | Transitive: eval, filesystem, unsafe | +14 |
952 kB | devceline |
| npm/@walletconnect/[email protected] | None | +4 |
188 kB | gancho_walletconnect |
| npm/@walletconnect/[email protected] | None | +4 |
2.52 MB | |
| npm/@walletconnect/[email protected] | Transitive: environment, filesystem, network, shell, unsafe | +42 |
12.9 MB | gancho_walletconnect |
| npm/@walletconnect/[email protected] | network | +21 |
4.99 MB | gancho_walletconnect |
| npm/[email protected] | None | 0 |
88.3 kB | achingbrain |
🚮 Removed packages: npm/@metamask/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/@walletconnect/[email protected], npm/[email protected]
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎
To accept the risk, merge this PR and you will not be notified again.
| Alert | Package | Note | Source |
|---|---|---|---|
| New author | npm/@walletconnect/[email protected] | ||
| New author | npm/@walletconnect/[email protected] | ||
| New author | npm/@walletconnect/[email protected] | ||
| New author | npm/@walletconnect/[email protected] | ||
| Network access | npm/@walletconnect/[email protected] |
|
Next steps
What is new author?
A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.
What is network access?
This module accesses the network.
Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.
Take a deeper look at the dependency
Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.
Remove the package
If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.
Mark a package as acceptable risk
To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all
@SocketSecurity ignore npm/@walletconnect/[email protected]@SocketSecurity ignore npm/@walletconnect/[email protected]@SocketSecurity ignore npm/@walletconnect/[email protected]@SocketSecurity ignore npm/@walletconnect/[email protected]@SocketSecurity ignore npm/@walletconnect/[email protected]
Bitrise
✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅
Commit hash: 843dccce0a3378d4677d2ce417d5c272e45d7fe6 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0fbafec6-af72-4d15-8279-38e257840e59
[!NOTE]
- You can kick off another
pr_smoke_e2e_pipelineon Bitrise by removing and re-applying theRun Smoke E2Elabel on the pull request
Test Plan
In the backward compatibility testing we refer to:
- Old Wallet -> Any wallet with sdk-communication-layer < 0.20.2
- New Wallet -> Wallet using sdk-communication-layer version 0.20.2
Combinations tested:
| Wallet | SDK | Result |
|---|---|---|
| Old Wallet | Old SDK | ✅ |
| Old Wallet | New SDK | ✅ |
| New Wallet | Old SDK | ✅ |
| New Wallet | New SDK | ✅ |
Test Cases:
Async disconnection 1
Given that a user connects to MetaMask from a dapp And Kills MetaMask and reopens again Then the Connection list should be empty
Async disconnection 2
Given that a user connects to MetaMask from a dapp And Kills/refreshes the dapp and reopens again And the user removes the connection from MetaMask Then the Connection list should be empty
Wallet Queue management (simulating a connection/Wallet crash)
Given that a user connects to MetaMask from a dapp And the user triggers a sign request followed by suddenly killing MM Then upon opening MetaMask manually the session should resume and a sign request should appear
Dapp types where tests were performed:
- NodeJS
- ReactNative
- React & NextJS
- iOS (socket version)
- Unity desktop (socket version)
Testing videos will come in the next comment.
Quality Gate passed
Issues
0 New issues
1 Accepted issue
Measures
0 Security Hotspots
32.2% Coverage on New Code
0.0% Duplication on New Code