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

Added QR code #23428

Merged
merged 64 commits into from May 2, 2024
Merged

Added QR code #23428

merged 64 commits into from May 2, 2024

Conversation

albertolive
Copy link
Contributor

@albertolive albertolive commented Mar 12, 2024

Description

Develop and implement a QR code-based system to enable secure and efficient connections between custodian accounts and the web extension, leveraging advanced encryption methods and API communication.

https://www.loom.com/share/5968d1ab02894f88a1b4155cd1c55fe1?sid=58fc6793-4a82-4e79-b2ab-6bd81377d5df

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

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.

@albertolive albertolive added the team-mmi PRs from the MMI team label Mar 12, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [36ec5f6]
Page Load Metrics (1056 ± 406 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint782521474923
domContentLoaded10117393115
load6420711056846406
domInteractive10117393115
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@albertolive
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

Copy link

socket-security bot commented Apr 18, 2024

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: npm/@metamask-institutional/transaction-update@0.1.38

View full report↗︎

Copy link

socket-security bot commented Apr 18, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

onClose();
}, [dispatch, mmiActions, onClose]);

const handleError = useCallback((message, e) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could extract this as a util function. wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that in this case it doesn't provide any benefit as it's only being used inside this component and it's just for MMI context.

setQrConnectionRequest(decryptedMessage);
handleClose();
} catch (e) {
handleError('An error occurred while updating connection requests.', e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you test this error handling as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To test the error handling inside the catch block when updating connection requests in the component, I need to simulate a scenario where setQrConnectionRequest fails. I don't think this will benefit us. Wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

The reason behind this one was i saw you have tests covering all other error catching scenario, if it is covered somewhere else we can leave this as an exception 🙏🏻

@metamaskbot
Copy link
Collaborator

Builds ready [2e65fbe]
Page Load Metrics (1229 ± 686 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint69149952411
domContentLoaded9491594
load56342312291429686
domInteractive9491494
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 181 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [87761a1]
Page Load Metrics (1384 ± 712 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint67161962612
domContentLoaded10301463
load55389313841484712
domInteractive10301463
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 181 Bytes (0.00%)

@albertolive albertolive merged commit 8d4e334 into develop May 2, 2024
70 of 71 checks passed
@albertolive albertolive deleted the MMI-4693-QR-code branch May 2, 2024 14:14
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2024
@metamaskbot metamaskbot added the release-11.18.0 Issue or pull request that will be included in release 11.18.0 label May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.18.0 Issue or pull request that will be included in release 11.18.0 team-mmi PRs from the MMI team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants