-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[Bug|Feat] blockaid external link clicked metric update #22631
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
[Bug|Feat] blockaid external link clicked metric update #22631
Conversation
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. |
- getBlockaidMetricsParams - add external_link_clicked - return result type for all types - return reason for all types - clean uiCustomizations - let -> const - update "NotApplicable" type logic. should not change final result. test updated based on guardrails
- fix early return - no early return on fail type and allow resultType and reason to be added to params with it
…xternalLinkClicked
- need to wrap with Provider
Builds ready [c25c418]
Page Load Metrics (779 ± 40 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
## Explanation This prop is used to pass a value used to be added as a transaction metametric fragment prop. ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? For example: --> Fixes https://github.com/MetaMask/MetaMask-planning/issues/1756 Related to MetaMask/metamask-extension#22631 ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/transaction-controller` - **feat**: Adds `externalLinkClicked` prop to TransactionMetaBase type ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate
…ntFragment - updates updateTransactionEventFragment to allow tx.id
This reverts commit 132dd80.
…3854) Reverts #3828 no longer needed after discovering we can update the event fragment ad-hoc using the useTransactionEventFragment hook Related to MetaMask/metamask-extension#22631
- pass transaction rather than pass securityAlertResponse for ease of use
…lockaidBannerAlert test phrase
security_alert_reason: BlockaidReason.setApprovalForAll, | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few tests were added here from the original. The filepath name change triggered GH to read this as a brand new file rather than a mere file path change. to see previous changes refer to https://github.com/MetaMask/metamask-extension/pull/22631/files#diff-2170a0c1976571856c2f505ee2b08d977d41c03ab57afc38c350753ee4fd8684
Builds ready [48d8739]
Page Load Metrics (995 ± 70 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #22631 +/- ##
===========================================
+ Coverage 68.11% 68.14% +0.02%
===========================================
Files 1086 1086
Lines 42628 42614 -14
Branches 11340 11337 -3
===========================================
+ Hits 29035 29036 +1
+ Misses 13593 13578 -15 ☔ View full report in Codecov by Sentry. |
Description
Various updates related to Blockaid metrics
Fixes
security_alert_response
andsecurity_alert_reason
transaction, event fragment prop if unnecessary. Previously would add "not applicable" values to all transaction metrics.Feat
security_alert_failed
ui_customization metric propCleanup
let uiCustomizations
→const uiCustomizations = [];
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1756
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist