Skip to content
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

fix: WalletConnect requests should show loading banner for blockaid. #7776

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

segun
Copy link
Contributor

@segun segun commented Nov 13, 2023

Description

Make PPOM validations for deeplink and walletconnect async to leverage recent blockaid performance improvements

The changes to app/components/Views/QRScanner/index.tsx are necessary as it's a bug introduced by a recent commit. Details of the bug and the fix here

Related issues

Fixes: #1655

  1. Checkout branch and run on real device
  2. Comment out the line described here
  3. Go to testdapp for wallet connect
  4. Connect wallet using wallet connect
  5. Perform a PPOM Transaction
  6. You should see a loading banner and after a few moments see the blockaid banner (as shown in image below)

Screenshots/Recordings

Before

IMG_1573

After

IMG_1572

Then

IMG_1573

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@segun segun self-assigned this Nov 13, 2023
@segun segun requested a review from a team as a code owner November 13, 2023 14:27
Copy link
Contributor

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 metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 13, 2023
Base automatically changed from olu/revert-deeplink-fix to main November 14, 2023 10:37
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (65754d5) 35.04% compared to head (5e10a23) 35.04%.

Files Patch % Lines
app/core/WalletConnect/WalletConnect.js 0.00% 5 Missing ⚠️
app/core/WalletConnect/WalletConnectV2.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7776      +/-   ##
==========================================
- Coverage   35.04%   35.04%   -0.01%     
==========================================
  Files        1040     1040              
  Lines       27709    27713       +4     
  Branches     2344     2343       -1     
==========================================
  Hits         9711     9711              
- Misses      17474    17478       +4     
  Partials      524      524              

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

@segun segun changed the title Fix wallet connect so it shows the loading banner for blockaid fix: WalletConnect requests should show loading banner for blockaid. Nov 14, 2023
@segun segun added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-confirmations-secure-ux-PR PR from the confirmations team and removed INVALID-PR-TEMPLATE PR's body doesn't match template labels Nov 14, 2023
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 14, 2023
@segun segun requested a review from jpuri November 14, 2023 11:43
@jpuri
Copy link
Contributor

jpuri commented Nov 14, 2023

Changes look good, will be great if some unit test coverage can also be added to it.

@blackdevelopa
Copy link
Contributor

@segun, it seems bitrise is failing. Can you update branch and retry?

Copy link

sonarcloud bot commented Nov 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@segun
Copy link
Contributor Author

segun commented Nov 17, 2023

@segun segun merged commit af2ae2c into main Nov 17, 2023
26 checks passed
@segun segun deleted the wallet-connect-fix branch November 17, 2023 08:54
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2023
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 17, 2023
@metamaskbot metamaskbot added the release-7.12.0 Issue or pull request that will be included in release 7.12.0 label Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-7.12.0 Issue or pull request that will be included in release 7.12.0 team-confirmations-secure-ux-PR PR from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QR Code scanning is broken
5 participants