Skip to content
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

Add Blockaid / PPOM Failed Request Security Alert #20362

Merged
merged 10 commits into from
Aug 14, 2023

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Aug 2, 2023

Explanation

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1056

Before these changes, we displayed no UI for failed PPOM responses.

This PR adds supporting UI for failed PPOM responses. It optionally hides SecurityProviderBannerAlert footer.

I also snuck in a 1 line fix to fix the alignment of the footer items 8300833

Screenshots/Screencaps

Before

Before, no alert was shown

After

Screenshot 2023-08-03 at 6 49 45 PM

Manual Testing Steps

  1. Run storybook: yarn storybook
  2. See BlockaidBannerAlert page
  3. Change reason value to "Failed"
  4. Observe UI

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@digiwand digiwand added the team-confirmations-secure-ux-PR PRs from the confirmations team label Aug 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

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.

@metamaskbot
Copy link
Collaborator

Builds ready [050c8b6]
Page Load Metrics (1437 ± 30 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint104140119105
domContentLoaded1340158014376130
load1340158014376230
domInteractive1340158014376130
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 18 Bytes (0.00%)
  • common: 199 Bytes (0.01%)

Base automatically changed from confirmation_page_alerts to develop August 3, 2023 10:54
- proposed to update reason value. planning to update upon update
@digiwand digiwand force-pushed the blockaid-failed-response-ui branch from 050c8b6 to 2fcfbdf Compare August 3, 2023 14:58
@digiwand digiwand force-pushed the blockaid-failed-response-ui branch from 2fcfbdf to 8300833 Compare August 3, 2023 15:15
@digiwand digiwand marked this pull request as ready for review August 3, 2023 15:20
@digiwand digiwand requested a review from a team as a code owner August 3, 2023 15:20
@digiwand digiwand changed the title blockaid: add request failed UI Add Blockaid / PPOM Failed Request Security Alert Aug 3, 2023
jpuri
jpuri previously approved these changes Aug 3, 2023
Copy link
Contributor

@segun segun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screenshot in the PR description doesn't quite align with what's in the figma.

@digiwand digiwand requested review from segun, jpuri and a team August 3, 2023 16:16
@digiwand digiwand marked this pull request as draft August 3, 2023 16:26
@digiwand
Copy link
Contributor Author

digiwand commented Aug 3, 2023

@segun @jpuri updated 814d4fb

@digiwand digiwand marked this pull request as ready for review August 3, 2023 16:51
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #20362 (d276979) into develop (e02f597) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head d276979 differs from pull request most recent head 29f30b0. Consider uploading reports for the commit 29f30b0 to get more accurate results

@@             Coverage Diff             @@
##           develop   #20362      +/-   ##
===========================================
- Coverage    68.84%   68.79%   -0.05%     
===========================================
  Files          993      993              
  Lines        38258    38194      -64     
  Branches     10248    10246       -2     
===========================================
- Hits         26338    26273      -65     
- Misses       11920    11921       +1     
Files Changed Coverage Δ
shared/constants/security-provider.ts 100.00% <100.00%> (ø)
...ert/blockaid-banner-alert/blockaid-banner-alert.js 95.65% <100.00%> (-0.35%) ⬇️
...der-banner-alert/security-provider-banner-alert.js 100.00% <100.00%> (ø)

... and 37 files with indirect coverage changes

@metamaskbot
Copy link
Collaborator

Builds ready [3d2cf24]
Page Load Metrics (1620 ± 57 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint111168134157
domContentLoaded14271946161811857
load14271946162011857
domInteractive14271946161811857
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 199 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [d276979]
Page Load Metrics (1493 ± 56 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint112167134147
domContentLoaded13821826149311656
load13821826149311656
domInteractive13821826149311656
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 199 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [640297e]
Page Load Metrics (1654 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1112581704723
domContentLoaded14511971165415474
load14511972165415474
domInteractive14511971165415474
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 199 Bytes (0.01%)

@digiwand digiwand merged commit 136ede5 into develop Aug 14, 2023
9 checks passed
@digiwand digiwand deleted the blockaid-failed-response-ui branch August 14, 2023 16:38
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2023
@metamaskbot metamaskbot added the release-10.36.0 Issue or pull request that will be included in release 10.36.0 label Aug 14, 2023
@Gudahtt Gudahtt added release-11.1.0 Issue or pull request that will be included in release 11.1.0 and removed release-10.36.0 Issue or pull request that will be included in release 10.36.0 labels Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.1.0 Issue or pull request that will be included in release 11.1.0 team-confirmations-secure-ux-PR PRs from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants