-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: Adding context to get current confirmation PR-6 #26685
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26685 +/- ##
===========================================
- Coverage 70.15% 70.15% -0.00%
===========================================
Files 1425 1425
Lines 49647 49653 +6
Branches 13890 13893 +3
===========================================
+ Hits 34828 34832 +4
- Misses 14819 14821 +2 ☔ View full report in Codecov by Sentry. |
Builds ready [231ab8e]
Page Load Metrics (72 ± 7 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
const processAction = useConfirmationAlertActions(); | ||
setConfirmationAlerts(); | ||
|
||
return ( | ||
<AlertMetricsProvider> | ||
<AlertMetricsProvider | ||
metrics={{ |
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.
Great spot, there could be alternate systems in future using the alert metrics that won't want to add metrics to transactions and signatures.
@@ -1,17 +1,26 @@ | |||
import React, { createContext, useContext, ReactNode, useMemo } from 'react'; | |||
import { useConfirmationAlertMetrics } from '../../../../pages/confirmations/hooks/useConfirmationAlertMetrics'; | |||
|
|||
const AlertMetricsContext = createContext<{ | |||
trackAlertActionClicked: (alertKey: string) => void; |
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.
Minor, could we define a type for the track methods to avoid this duplication, such as AlertMetricsCallbacks
?
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.
Done 👍
Quality Gate passedIssues Measures |
Builds ready [2910775]
Page Load Metrics (1837 ± 120 ms)
Bundle size diffs
|
Description
Using context to get currently selected confirmation in re-designed confirmation pages. This is done to switch to using react context transient UI state in re-designed confirmation pages.
Related issues
Ref: #26414
Manual testing steps
NA
Screenshots/Recordings
NA
Pre-merge author checklist
Pre-merge reviewer checklist