Skip to content

Conversation

@digiwand
Copy link
Contributor

@digiwand digiwand commented Jan 16, 2024

Description

As mentioned in the related issue

"
not all instances of the BlockaidBannerAlert are firing the event.

instances supported:

  • ui/components/app/signature-request/signature-request.js (eth_signTypedData versions V3 and V4)
  • ui/components/app/transaction-alerts/transaction-alerts.js

instances not supported:

  • ui/components/app/signature-request-original/signature-request-original.component.js
  • ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
  • ui/pages/token-allowance/token-allowance.js
  • ui/components/app/signature-request-siwe/signature-request-siwe.js

"

This PR adds support to the missing instances.

Additionally:

  • minor lint fixes - missing deps
  • remove superfluous ONLY_INCLUDE_IF(blockaid) guardrails

Updates to the schema are being discussed. I am considering cleanup. These and tests will be implemented in a future PR.

Related issues

Fixes: #22667

Manual testing steps

  1. Go to test-dapp
  2. Use PPOM section to QA
  • confirm approve - Approval BUSD
  • confirm allowance - Set Approval For All

I was unable to reproduce the malicious SIWE and the non-v3 or non-v4 signTyped signatures

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.

@digiwand digiwand requested a review from a team as a code owner January 16, 2024 21:22
@github-actions
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.

@digiwand digiwand added team-confirmations-secure-ux-PR PRs from the confirmations team needs-qa Label will automate into QA workspace labels Jan 16, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [da3b015]
Page Load Metrics (1253 ± 137 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint872851647234
domContentLoaded9188647234
load92521271253286137
domInteractive9188647234
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 1.74 KiB (0.02%)
  • common: 0 Bytes (0.00%)

@digiwand digiwand removed the needs-qa Label will automate into QA workspace label Jan 22, 2024
@digiwand
Copy link
Contributor Author

merging this now since tests seem to be passing implying the related code should continue to work. QA'd some of the updates

note: I wasn't able to check the metrics for

malicious SIWE and the non-v3 or non-v4 signTyped signatures

we can keep an eye out for these

cc: @bschorchit @blackdevelopa @jpuri @seaona @segun

@digiwand digiwand merged commit 35273da into develop Jan 22, 2024
@digiwand digiwand deleted the fix-blockaid-false-positive-metrics branch January 22, 2024 15:44
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
@metamaskbot metamaskbot added the release-11.10.0 Issue or pull request that will be included in release 11.10.0 label Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.10.0 Issue or pull request that will be included in release 11.10.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]: Blockaid "External Link Clicked" events are missing from certain transaction types

5 participants