-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: implementing alerts for typed sign data signatures #24702
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #24702 +/- ##
===========================================
- Coverage 67.37% 65.73% -1.64%
===========================================
Files 1278 1363 +85
Lines 49881 54269 +4388
Branches 12944 14107 +1163
===========================================
+ Hits 33605 35673 +2068
- Misses 16276 18596 +2320 ☔ View full report in Codecov by Sentry. |
Builds ready [aa6f1db]
Page Load Metrics (545 ± 400 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
86ac594
to
5891026
Compare
Builds ready [2bfa479]
Page Load Metrics (1463 ± 604 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
53049d5
to
a473161
Compare
Builds ready [7dac653]
Page Load Metrics (970 ± 565 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
||
const unconfirmedDangerAlerts = fieldAlerts.filter( |
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.
❤️
onClick={hasDangerFieldAlerts ? handleOpenConfirmModal : onSubmit} | ||
danger={hasDangerAlerts ? true : isDangerButton} | ||
onClick={hasDangerAlerts ? handleOpenConfirmModal : onSubmit} | ||
danger={hasDangerAlerts} | ||
size={ButtonSize.Lg} | ||
disabled={hasUnconfirmedDangerAlerts ? false : disabled} | ||
> | ||
{hasUnconfirmedDangerAlerts ? t('reviewAlerts') : t('confirm')} |
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.
After our discussion regarding the designs for the MVP , I wanted to confirm a few details.
Once we receive a general alert from Blockaid, the button will be labeled Review Alerts
. Clicking this button will open a friction modal where the user can acknowledge the alert and proceed to confirm the action.
Is that correct?
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.
Yes, that is how it will work.
<ConfirmAlertModal {...defaultProps} />, | ||
mockStore, | ||
); | ||
// todo: following 2 tests have been temporarily commented out |
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.
Do we need to comment out these two unit tests? I understand that the MVP does not support multiple providers, but can we keep the use case in the unit tests unless they are broken due to the MVP changes?
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.
Yep that is issue these test are breaking.
The base branch was changed.
7dac653
to
09eea0a
Compare
09eea0a
to
bc973c5
Compare
Builds ready [bc973c5]
Page Load Metrics (431 ± 404 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx
Outdated
Show resolved
Hide resolved
ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx
Outdated
Show resolved
Hide resolved
Also, the see details section within the warning might be rendering with the wrong font/size cc: @SayaGT |
Hey @bschorchit : I tested it using malicious permits in test dapp and it seems to work well: |
@bschorchit @jpuri yes the font size for the alert details seems wrong. It should be Body-MD (baseline). Also the CTA shouldn't be "Review alerts", it should be Confirm. |
I do see it as red as well, but sometimes only after ~1s. It doesn't happen every time, but I can consistently reproduce by trying a few times and alternating between Here's a recording: alert.mov |
Summing up to facilitate reading (sorry for the multiple comments):
|
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.
Amazing PR! 🥇 🚀
Builds ready [e57494d]
Page Load Metrics (829 ± 557 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Extend alert system to typed signatures.
Related issues
Fixes: #24611
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist