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

Confirmation page alerts #20125

Merged
merged 45 commits into from
Aug 3, 2023
Merged

Confirmation page alerts #20125

merged 45 commits into from
Aug 3, 2023

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Jul 21, 2023

Adding security alert banners on confirmation pages.

@jpuri jpuri requested a review from a team July 21, 2023 10:18
@github-actions
Copy link
Contributor

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.

@jpuri jpuri force-pushed the blockaid_metrics branch 2 times, most recently from 6e30484 to 1b9539a Compare July 24, 2023 07:32
@jpuri jpuri force-pushed the confirmation_page_alerts branch 2 times, most recently from 4cd64a6 to cc03448 Compare July 24, 2023 08:24
@jpuri jpuri marked this pull request as ready for review July 24, 2023 09:25
@jpuri jpuri requested a review from a team as a code owner July 24, 2023 09:25
@metamaskbot
Copy link
Collaborator

Builds ready [cc44ac4]
Page Load Metrics (1462 ± 31 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint982461344622
domContentLoaded1333157914626631
load1333157914626631
domInteractive1333157914626631
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 48 Bytes (0.00%)
  • ui: 66 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #20125 (bd8e6f9) into blockaid_metrics (afef9fd) will increase coverage by 0.02%.
The diff coverage is 82.61%.

❗ Current head bd8e6f9 differs from pull request most recent head 5ac22df. Consider uploading reports for the commit 5ac22df to get more accurate results

@@                 Coverage Diff                  @@
##           blockaid_metrics   #20125      +/-   ##
====================================================
+ Coverage             68.69%   68.72%   +0.02%     
====================================================
  Files                   986      986              
  Lines                 37898    37844      -54     
  Branches              10148    10122      -26     
====================================================
- Hits                  26034    26005      -29     
+ Misses                11864    11839      -25     
Files Changed Coverage Δ
app/scripts/metamask-controller.js 65.46% <ø> (ø)
...ontent/confirm-page-container-content.component.js 91.84% <ø> (ø)
...der-banner-alert/security-provider-banner-alert.js 100.00% <ø> (ø)
...t-original/signature-request-original.component.js 57.00% <ø> (ø)
...p/signature-request-siwe/signature-request-siwe.js 71.93% <ø> (ø)
...ponents/app/signature-request/signature-request.js 73.61% <ø> (ø)
ui/pages/token-allowance/token-allowance.js 67.97% <ø> (ø)
app/scripts/lib/ppom/ppom-middleware.ts 80.00% <33.33%> (-8.89%) ⬇️
app/scripts/controllers/transactions/index.js 72.89% <85.71%> (+0.45%) ⬆️
shared/constants/security-provider.ts 100.00% <100.00%> (ø)
... and 1 more

... and 32 files with indirect coverage changes

@jpuri
Copy link
Contributor Author

jpuri commented Jul 25, 2023

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

No policy changes

@metamaskbot
Copy link
Collaborator

Builds ready [54f27c5]
Page Load Metrics (1606 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1122011342110
domContentLoaded14421796160611455
load14421796160611455
domInteractive14421796160611455
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 48 Bytes (0.00%)
  • ui: 66 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

segun
segun previously approved these changes Jul 25, 2023
@jpuri jpuri requested a review from kumavis as a code owner July 26, 2023 05:31
@jpuri jpuri force-pushed the confirmation_page_alerts branch 2 times, most recently from 628e2e8 to 6603bf7 Compare July 26, 2023 06:29
@metamaskbot
Copy link
Collaborator

Builds ready [997c035]
Page Load Metrics (1709 ± 80 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1192751543416
domContentLoaded14252067170816579
load14252082170916780
domInteractive14252067170816579
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 46 Bytes (0.00%)
  • ui: 66 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [bd8e6f9]
Page Load Metrics (1666 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1122371452612
domContentLoaded14492151166415775
load14492151166615977
domInteractive14492151166415775
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 46 Bytes (0.00%)
  • ui: 66 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

No policy changes

@jpuri jpuri requested review from segun and digiwand August 1, 2023 12:27
@metamaskbot
Copy link
Collaborator

Builds ready [d8192ee]
Page Load Metrics (1734 ± 83 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1222241512211
domContentLoaded14512159173317483
load14512159173417483
domInteractive14512159173317483
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 18 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@jpuri jpuri requested a review from digiwand August 1, 2023 14:47
Copy link
Contributor

@digiwand digiwand left a comment

Choose a reason for hiding this comment

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

currently, the description is

Adding security alert banners on confirmation pages.

can we provide more details please? there also seems to be additional logic added to this PR. It may have been helpful to separate logic into more PRs

example details i think we can add

  • update app/scripts/lib/ppom/ppom.js
  • support result_type: Failed key/value
  • rename ppomResponsesecurityAlertResponse
  • update margin

if (
resultType === BlockaidResultType.Benign ||
resultType === BlockaidResultType.Failed
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

According to our discussion @jpuri we are supposed to return the new banner alert when result type is Failed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@segun : UI changed for failed status will be implemented in a following PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

could be helpful to add in the description. working on it here:
https://github.com/MetaMask/MetaMask-planning/issues/1056

@jpuri
Copy link
Contributor Author

jpuri commented Aug 2, 2023

currently, the description is

Adding security alert banners on confirmation pages.

can we provide more details please? there also seems to be additional logic added to this PR. It may have been helpful to separate logic into more PRs

example details i think we can add

  • update app/scripts/lib/ppom/ppom.js
  • support result_type: Failed key/value
  • rename ppomResponsesecurityAlertResponse
  • update margin

Yep @digiwand : the PR is old and description became stale.

@jpuri jpuri added the team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead label Aug 2, 2023
@jpuri jpuri requested review from segun and digiwand August 2, 2023 12:01
@metamaskbot
Copy link
Collaborator

Builds ready [d88685e]
Page Load Metrics (1610 ± 82 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1063171414321
domContentLoaded14212056161017082
load14212056161017082
domInteractive14212056161017082
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 36 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@jpuri jpuri merged commit 8c46f85 into develop Aug 3, 2023
8 of 9 checks passed
@jpuri jpuri deleted the confirmation_page_alerts branch August 3, 2023 10:54
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2023
@metamaskbot metamaskbot added the release-10.36.0 Issue or pull request that will be included in release 10.36.0 label Aug 3, 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 DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants