Skip to content

feat(22244): update pricing api from coingekco to our own ones#22247

Merged
DDDDDanica merged 1 commit intodevelopfrom
feature/22244-price-api
Dec 13, 2023
Merged

feat(22244): update pricing api from coingekco to our own ones#22247
DDDDDanica merged 1 commit intodevelopfrom
feature/22244-price-api

Conversation

@DDDDDanica
Copy link
Copy Markdown
Contributor

@DDDDDanica DDDDDanica commented Dec 12, 2023

Description

Switch pricing api to our own ones.
Documentation: https://price-api.metafi.codefi.network/docs#/Spot%20Prices/PriceController_getSpotPricesByTokenAddressesV2
Sample request

curl -X 'GET' \
  'https://price-api.metafi.codefi.network/v2/chains/1/spot-prices?tokenAddresses=0x6B3595068778DD592e39A122f4f5a5cF09C90fE2&vsCurrency=eth&includeMarketData=false' \
  -H 'accept: */*'

and previous request:

https://api.coingecko.com/api/v3/simple/token_price/ethereum?contract_addresses=0x6B3595068778DD592e39A122f4f5a5cF09C90fE2&vs_currencies=eth

PS: response body is the same

{
  "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2": {
    "eth": 0.0005476732834127384
  }
}

also fix failing e2e test in
#22266

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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 12, 2023
@DDDDDanica DDDDDanica requested a review from a team as a code owner December 12, 2023 17:01
@github-actions
Copy link
Copy Markdown
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.

@DDDDDanica DDDDDanica force-pushed the feature/22244-price-api branch from f3a8f08 to 45ebb7e Compare December 13, 2023 14:21
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 13, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (ce98650) 67.74% compared to head (45ebb7e) 67.74%.
Report is 1 commits behind head on develop.

Files Patch % Lines
ui/pages/swaps/swaps.util.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #22247   +/-   ##
========================================
  Coverage    67.74%   67.74%           
========================================
  Files         1065     1065           
  Lines        41272    41272           
  Branches     11065    11065           
========================================
  Hits         27959    27959           
  Misses       13313    13313           

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

@DDDDDanica DDDDDanica merged commit 147ddd3 into develop Dec 13, 2023
@DDDDDanica DDDDDanica deleted the feature/22244-price-api branch December 13, 2023 15:08
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2023
@DDDDDanica
Copy link
Copy Markdown
Contributor Author

Also include fix in #22266

@metamaskbot metamaskbot added the release-11.9.0 Issue or pull request that will be included in release 11.9.0 label Dec 13, 2023
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [45ebb7e]
Page Load Metrics (1173 ± 135 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint913241667637
domContentLoaded11199697134
load78918181173281135
domInteractive11199697134
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -33 Bytes (-0.00%)
  • common: 0 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.9.0 Issue or pull request that will be included in release 11.9.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.9.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