-
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
fix: adding warning for origin on redesigned pages #26306
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. |
Into my wallet |
My wallet |
…ension into add_origin_warning
…ension into add_origin_warning
…ension into add_origin_warning
ui/pages/confirmations/components/confirm/info/personal-sign/personal-sign.tsx
Outdated
Show resolved
Hide resolved
ui/hooks/useAlerts.ts
Outdated
@@ -37,8 +37,10 @@ const useAlerts = (ownerId: string) => { | |||
if (!field) { | |||
return []; | |||
} | |||
|
|||
return alerts.filter((alert) => alert.field === field); | |||
const fields = field.split(','); |
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.
Following my other comment about alert keys, this logic shouldn't be needed as every field should have a single alert key, and multiple alerts can reference it.
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.
I fixed it.
...ges/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/hooks/alerts/useConfirmationOriginAlerts.ts
Outdated
Show resolved
Hide resolved
], | ||
}, | ||
]; | ||
}, [currentConfirmation, t]); |
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.
Rather than returning a fresh object every time the confirmation changes at all, could we instead use the most stable dependencies possible such as isInvalidAscii
, field
and t
?
It also simplifies the code since we can move the core logic out of the useMemo
.
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.
I agree with @matthewwalsh0 that we should update the alertKey values to represent the field references.
Renaming the existing props, as mentioned in a thread above, may be out of scope of this PR and could be followed up separately
Builds ready [2f8bafd]
Page Load Metrics (916 ± 645 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26306 +/- ##
===========================================
+ Coverage 69.96% 69.97% +0.01%
===========================================
Files 1405 1406 +1
Lines 48996 49019 +23
Branches 13697 13702 +5
===========================================
+ Hits 34280 34299 +19
- Misses 14716 14720 +4 ☔ View full report in Codecov by Sentry. |
ui/pages/confirmations/hooks/alerts/useConfirmationOriginAlerts.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/hooks/alerts/useConfirmationOriginAlerts.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/hooks/alerts/useConfirmationOriginAlerts.ts
Outdated
Show resolved
Hide resolved
Builds ready [b76e671]
Page Load Metrics (264 ± 266 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Quality Gate passedIssues Measures |
Builds ready [501302a]
Page Load Metrics (91 ± 25 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Adding origin related validation in all redesigned confirmation pages.
Related issues
NA
Manual testing steps
NA
Screenshots/Recordings
NA
Pre-merge author checklist
Pre-merge reviewer checklist