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: Send ppom metrics when transaction is cancelled. #9075

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

segun
Copy link
Contributor

@segun segun commented Mar 27, 2024

Description

We should send PPOM/Blockaid metrics parameters when a transaction from wallet is rejected. Right now we only send the metrics when the transaction is approved.

Related issues

Fixes: #8824

Manual testing steps

  1. Enable Blockiad
  2. Enable metrics
  3. Initiate a malicious tx from inside the wallet
  4. Cancel/Reject the transaction
  5. See that PPOM Metrics is sent in the logs

Screenshots/Recordings

Before

no-metrics-tx-inside-wallet.mp4

After

on_cancel_metrics.mov

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.

@segun segun requested review from a team as code owners March 27, 2024 12:57
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.

@segun segun self-assigned this Mar 27, 2024
@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 area-metrics Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 27, 2024
Copy link
Contributor

github-actions bot commented Mar 27, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 72d6561
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d1264471-3d2f-4bcd-9632-ef56482d4eb7

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

@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 45.55%. Comparing base (9339770) to head (72d6561).
Report is 3 commits behind head on main.

Files Patch % Lines
...tions/components/ApproveTransactionReview/index.js 0.00% 2 Missing ⚠️
app/components/UI/Navbar/index.js 0.00% 1 Missing ⚠️
...ents/Views/confirmations/SendFlow/Confirm/index.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9075      +/-   ##
==========================================
- Coverage   45.58%   45.55%   -0.04%     
==========================================
  Files        1276     1272       -4     
  Lines       31301    31238      -63     
  Branches     3202     3190      -12     
==========================================
- Hits        14269    14229      -40     
+ Misses      16186    16169      -17     
+ Partials      846      840       -6     

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

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
code cleanup

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
@segun segun force-pushed the olu/normal-send-ppom-metrics branch from 09b678d to e474efb Compare March 27, 2024 16:12
@segun segun removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 11, 2024
Copy link

sonarcloud bot commented Apr 11, 2024

@segun segun merged commit d1e2d67 into main Apr 11, 2024
31 checks passed
@segun segun deleted the olu/normal-send-ppom-metrics branch April 11, 2024 08:47
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2024
@metamaskbot metamaskbot added the release-7.21.0 Issue or pull request that will be included in release 7.21.0 label Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-metrics release-7.21.0 Issue or pull request that will be included in release 7.21.0 team-confirmations-secure-ux-PR PR from the confirmations team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: PPOM - No blockaid data is included in Metrics events for transactions triggered from inside the wallet
5 participants