Skip to content

fix: Send ppom metrics when transaction is cancelled.#9215

Merged
segun merged 3 commits intomainfrom
olu/normal-send-ppom-metrics-2
Apr 16, 2024
Merged

fix: Send ppom metrics when transaction is cancelled.#9215
segun merged 3 commits intomainfrom
olu/normal-send-ppom-metrics-2

Conversation

@segun
Copy link
Copy Markdown
Contributor

@segun segun commented Apr 12, 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 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 Run Smoke E2E labels Apr 12, 2024
@segun segun self-assigned this Apr 12, 2024
@segun segun requested a review from a team as a code owner April 12, 2024 12:12
@segun segun requested a review from a team April 12, 2024 12:12
@segun segun requested a review from a team as a code owner April 12, 2024 12:12
@github-actions
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 12, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 2542e32
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/008e1d4d-b2d2-474e-b2a6-65efd3c9a464

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

segun added 3 commits April 15, 2024 10:41
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
code cleanup

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
@segun segun force-pushed the olu/normal-send-ppom-metrics-2 branch from 2542e32 to 95ec341 Compare April 15, 2024 09:41
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 95ec341
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ad413e28-1075-4233-8bd7-ed8a7ea62aec

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

Copy link
Copy Markdown
Contributor

@jpuri jpuri left a comment

Choose a reason for hiding this comment

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

LGTM

@segun segun merged commit 594cf3f into main Apr 16, 2024
@segun segun deleted the olu/normal-send-ppom-metrics-2 branch April 16, 2024 12:09
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2024
@metamaskbot metamaskbot added the release-7.22.0 Issue or pull request that will be included in release 7.22.0 label Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.22.0 Issue or pull request that will be included in release 7.22.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

4 participants