Skip to content

Stop doing ppom validation on metamask swaps#22847

Merged
jpuri merged 3 commits intodevelopfrom
no-ppom-swaps
Feb 9, 2024
Merged

Stop doing ppom validation on metamask swaps#22847
jpuri merged 3 commits intodevelopfrom
no-ppom-swaps

Conversation

@danjm
Copy link
Copy Markdown
Contributor

@danjm danjm commented Feb 7, 2024

Description

We do not need to validate MetaMask swaps with our ppom validation because we know they are safe (they go to a smart contract we control). Doing this validation on swaps has a performance cost and an unnecessary cost on the provider.

Related issues

Fixes: #22791

Manual testing steps

  1. Perform a swap
  2. Inspect state logs to verify that there is no securityAlertResponse property on the transaction metadata
  3. Perform a simple send
  4. Inspect state logs to verify that there is a securityAlertResponse property on the transaction metadata

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.

@danjm danjm requested a review from a team as a code owner February 7, 2024 10:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 7, 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.

@danjm danjm added the team-confirmations-secure-ux-deprecated DEPRECATED: please use "team-confirmations" instead label Feb 7, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 7, 2024
jpuri
jpuri previously approved these changes Feb 7, 2024
digiwand
digiwand previously approved these changes Feb 7, 2024
@bschorchit bschorchit added team-confirmations-secure-ux-PR PRs from the confirmations team and removed team-confirmations-secure-ux-deprecated DEPRECATED: please use "team-confirmations" instead labels Feb 7, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6207da3) 68.42% compared to head (892114c) 68.42%.
Report is 34 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22847      +/-   ##
===========================================
+ Coverage    68.42%   68.42%   +0.01%     
===========================================
  Files         1089     1089              
  Lines        42908    42915       +7     
  Branches     11414    11419       +5     
===========================================
+ Hits         29357    29364       +7     
  Misses       13551    13551              

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

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [892114c]
Page Load Metrics (805 ± 35 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint82130107126
domContentLoaded10421973
load68910688057335
domInteractive10421973
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 257 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@jpuri jpuri merged commit 201a48f into develop Feb 9, 2024
@jpuri jpuri deleted the no-ppom-swaps branch February 9, 2024 06:17
@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2024
@metamaskbot metamaskbot added the release-11.12.0 Issue or pull request that will be included in release 11.12.0 label Feb 9, 2024
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-11.12.0 Issue or pull request that will be included in release 11.12.0 team-confirmations-secure-ux-PR PRs from the confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: PPOM - Validation is performed on Swap transactions

5 participants