Skip to content

fix: wc connections and permissions system network improvement#9150

Merged
christopherferreira9 merged 4 commits intomainfrom
fix/wcconnection
Apr 9, 2024
Merged

fix: wc connections and permissions system network improvement#9150
christopherferreira9 merged 4 commits intomainfrom
fix/wcconnection

Conversation

@abretonc7s
Copy link
Copy Markdown
Contributor

@abretonc7s abretonc7s commented Apr 5, 2024

Description

This PR addresses regression with permission system integration and wallet connect issues regarding switching chains.

  • WC: Add loading screen while establishing connection.
  • WC: Add "Go Back to Dapp" modal on deeplinks for improved ux.

PENDING videos from wc showing previous issues

Related issues

Fixes: issues on some RPC calls that could potentially return an empty list of account instead of the one that were permitted.

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2024

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.

@abretonc7s abretonc7s added team-sdk-deprecated DEPRECATED: please use "team-wallet-integrations" instead WalletConnect WalletConnect related issue or bug needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Apr 5, 2024
@abretonc7s abretonc7s marked this pull request as ready for review April 5, 2024 14:14
@abretonc7s abretonc7s requested a review from a team as a code owner April 5, 2024 14:14
@abretonc7s abretonc7s marked this pull request as draft April 5, 2024 14:15
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 22.58065% with 96 lines in your changes are missing coverage. Please review.

Project coverage is 45.89%. Comparing base (4be64ff) to head (dc07acd).
Report is 3 commits behind head on main.

Files Patch % Lines
app/core/WalletConnect/WalletConnectV2.ts 0.00% 54 Missing ⚠️
app/core/SDKConnect/handlers/checkPermissions.ts 52.17% 9 Missing and 2 partials ⚠️
app/core/WalletConnect/extractApprovedAccounts.ts 10.00% 9 Missing ⚠️
app/core/RPCMethods/RPCMethodMiddleware.ts 60.00% 6 Missing and 2 partials ⚠️
app/core/WalletConnect/wc-utils.ts 22.22% 7 Missing ⚠️
app/core/BackgroundBridge/BackgroundBridge.js 0.00% 6 Missing ⚠️
app/components/Nav/App/index.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9150      +/-   ##
==========================================
- Coverage   45.98%   45.89%   -0.10%     
==========================================
  Files        1273     1274       +1     
  Lines       31342    31438      +96     
  Branches     3213     3232      +19     
==========================================
+ Hits        14414    14428      +14     
- Misses      16079    16159      +80     
- Partials      849      851       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 5, 2024

@abretonc7s abretonc7s marked this pull request as ready for review April 5, 2024 14:35
@christopherferreira9 christopherferreira9 added QA in Progress QA has started on the feature. Run Smoke E2E and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Apr 8, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: dc07acd
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/db7cb5f6-8c6c-4c5c-ae5d-19e5df5d14ec

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

@christopherferreira9 christopherferreira9 added QA Passed QA testing has been completed and passed and removed QA in Progress QA has started on the feature. labels Apr 9, 2024
Copy link
Copy Markdown
Contributor

@andreahaku andreahaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@christopherferreira9
Copy link
Copy Markdown
Contributor

Test Cases for both android and iOS:

  • Connect to a WC Dapp via deeplink

  • Sign -> You're able to sign

  • Connect to a WC Dapp via deeplink with 2 accounts

  • Switch account on the wallet to permittedAccounts[1]

  • Wallet get's synced and you're able to sign

Repeat both test cases but using a QRCode instead.

@christopherferreira9 christopherferreira9 merged commit 5bf2827 into main Apr 9, 2024
@christopherferreira9 christopherferreira9 deleted the fix/wcconnection branch April 9, 2024 08:32
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2024
@metamaskbot metamaskbot added the release-7.21.0 Issue or pull request that will be included in release 7.21.0 label Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.21.0 Issue or pull request that will be included in release 7.21.0 team-sdk-deprecated DEPRECATED: please use "team-wallet-integrations" instead WalletConnect WalletConnect related issue or bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants