Skip to content

feat(22139): add header to requests going to CoinGecko#22151

Merged
DDDDDanica merged 2 commits intodevelopfrom
fix/22139-coingecko-header
Dec 5, 2023
Merged

feat(22139): add header to requests going to CoinGecko#22151
DDDDDanica merged 2 commits intodevelopfrom
fix/22139-coingecko-header

Conversation

@DDDDDanica
Copy link
Copy Markdown
Contributor

Description

Add the header to request sending to CoinGecko to help avoid api abuse.

Related issues

Fixes: https://app.zenhub.com/workspaces/extension-delivery-board-6216892781ac020010e826d1/issues/gh/metamask/metamask-extension/22139

Manual testing steps

  1. Re-install the extension
  2. Toggle auto detect token on
  3. Import any token in mainnet
  4. Check network request with "coin"
  5. Validate that there's header as { X-Coingecko-Source: metamask.dec.jan.2024 }

Screenshots/Recordings

Before

Screenshot 2023-12-04 at 21 45 38

After

Screenshot 2023-12-04 at 21 57 54

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@DDDDDanica DDDDDanica self-assigned this Dec 4, 2023
@DDDDDanica DDDDDanica requested a review from a team as a code owner December 4, 2023 22:04
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 4, 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.

@DDDDDanica DDDDDanica force-pushed the fix/22139-coingecko-header branch 3 times, most recently from 1dec577 to 79a0878 Compare December 4, 2023 23:32
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [79a0878]
Page Load Metrics (1168 ± 45 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint9112410384
domContentLoaded10231631
load1041132211689445
domInteractive10231631
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 55 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5ee10d3) 67.71% compared to head (4e5d7be) 67.71%.
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #22151   +/-   ##
========================================
  Coverage    67.71%   67.71%           
========================================
  Files         1053     1053           
  Lines        40875    40875           
  Branches     10950    10950           
========================================
  Hits         27676    27676           
  Misses       13199    13199           

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

@DDDDDanica DDDDDanica force-pushed the fix/22139-coingecko-header branch from 79a0878 to 1b7121e Compare December 5, 2023 00:23
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [1b7121e]
Page Load Metrics (1236 ± 57 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint89137106126
domContentLoaded9421773
load10401379123611957
domInteractive9421773
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 55 Bytes (0.00%)
  • common: 115 Bytes (0.00%)

@DDDDDanica DDDDDanica merged commit cb637b6 into develop Dec 5, 2023
@DDDDDanica DDDDDanica deleted the fix/22139-coingecko-header branch December 5, 2023 14:55
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
@metamaskbot metamaskbot added the release-11.8.0 Issue or pull request that will be included in release 11.8.0 label Dec 5, 2023
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [4e5d7be]
Page Load Metrics (1254 ± 47 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint91160103168
domContentLoaded9451894
load1070150212549747
domInteractive9451894
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 55 Bytes (0.00%)
  • common: 115 Bytes (0.00%)

@metamaskbot metamaskbot added release-11.7.3 Issue or pull request that will be included in release 11.7.3 and removed release-11.8.0 Issue or pull request that will be included in release 11.8.0 labels Jan 2, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-11.7.3 on PR. Adding release label release-11.7.3 on PR and removing other release labels(release-11.8.0), as PR was cherry-picked in branch 11.7.3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.7.3 Issue or pull request that will be included in release 11.7.3 team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants