metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

feat: full sdk persistence and protocol upgrade

Open abretonc7s opened this issue 1 year ago • 3 comments

Description

Related issues

Fixes:

Manual testing steps

  1. 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.

abretonc7s avatar Apr 29 '24 10:04 abretonc7s

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.

github-actions[bot] avatar Apr 29 '24 10:04 github-actions[bot]

🚨 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 NoteSource
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]

View full report↗︎

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

socket-security[bot] avatar May 06 '24 11:05 socket-security[bot]

https://bitrise.io/ 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_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

github-actions[bot] avatar May 09 '24 14:05 github-actions[bot]

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.

christopherferreira9 avatar May 09 '24 15:05 christopherferreira9