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

feat: add utility function to get supported chains from the Security Alerts API #25716

Merged
merged 11 commits into from
Jul 22, 2024

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Jul 9, 2024

Description

This PR aims to include a new utility function to get supported chains from the Security Alerts API when enabled.

Related Repository

Refer to the Security Alerts API repository for more details.

Open in GitHub Codespaces

Related issues

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

Manual testing steps

  1. Test blockaid regression

  2. add the envs

SECURITY_ALERTS_API_URL='https://security-alerts.dev-api.cx.metamask.io'
SECURITY_ALERTS_API_ENABLED='true'
  • Go to test dapp and trigger on of the malicious signatures
  • To verify in chrome go to dev tools > network. Search for security-alerts and find the call to the API service.

Existing PPOM logic should function as before, even with the above environment variables added, due to the fallback to the controller in the event of an error.

Screenshots/Recordings

supported-chains.webm

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Jul 9, 2024
Copy link
Contributor

github-actions bot commented Jul 9, 2024

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.

@vinistevam vinistevam marked this pull request as ready for review July 9, 2024 12:57
@vinistevam vinistevam requested a review from a team as a code owner July 9, 2024 12:57
@metamaskbot
Copy link
Collaborator

Builds ready [7e6af5d]
Page Load Metrics (208 ± 230 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint933921406230
domContentLoaded134631105
load602286208479230
domInteractive134631105
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 451 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.67%. Comparing base (3454333) to head (fe04f80).
Report is 9 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25716   +/-   ##
========================================
  Coverage    69.67%   69.67%           
========================================
  Files         1400     1400           
  Lines        49513    49521    +8     
  Branches     13692    13693    +1     
========================================
+ Hits         34495    34502    +7     
- Misses       15018    15019    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

jpuri
jpuri previously approved these changes Jul 10, 2024
@vinistevam vinistevam dismissed stale reviews from jpuri and pedronfigueiredo via 47cce73 July 11, 2024 11:46
@metamaskbot
Copy link
Collaborator

Builds ready [47cce73]
Page Load Metrics (152 ± 141 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint623781217636
domContentLoaded97929199
load391406152293141
domInteractive97929199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 338 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: -271 Bytes (-0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [5bfc335]
Page Load Metrics (76 ± 10 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint71134102199
domContentLoaded96432178
load43112762210
domInteractive96432178
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 344 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: -271 Bytes (-0.00%)

Copy link

@metamaskbot
Copy link
Collaborator

Builds ready [fe04f80]
Page Load Metrics (162 ± 186 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint80130101167
domContentLoaded106425116
load421853162388186
domInteractive106425116
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 344 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: -278 Bytes (-0.00%)

@vinistevam vinistevam merged commit 2103232 into develop Jul 22, 2024
82 checks passed
@vinistevam vinistevam deleted the feat/add-utility-function-supported-chains branch July 22, 2024 10:36
@github-actions github-actions bot locked and limited conversation to collaborators Jul 22, 2024
@metamaskbot metamaskbot added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants