Skip to content

fix: fallback conversion rate for token market data #4615#26460

Merged
bergeron merged 1 commit intoVersion-v12.1.0from
brian/12.1.0-fix-fallback-conversion-rate
Aug 16, 2024
Merged

fix: fallback conversion rate for token market data #4615#26460
bergeron merged 1 commit intoVersion-v12.1.0from
brian/12.1.0-fix-fallback-conversion-rate

Conversation

@bergeron
Copy link
Copy Markdown
Contributor

@bergeron bergeron commented Aug 16, 2024

Description

Patches MetaMask/core#4615

When the price API does not support the native currency (e.g. MATIC), prices are fetched in ETH and an additional conversion hop is performed to the native currency. But this hop was only being performed on the current price, and was missing on the extended market data like marketCap, allTimeHigh, etc.

Open in GitHub Codespaces

Related issues

Manual testing steps

  1. Open the token details page for a polygon token
  2. Verify market cap, all time low, all time high are correct

Screenshots/Recordings

Before

Screenshot 2024-08-15 at 6 08 43 PM Screenshot 2024-08-15 at 6 22 15 PM

After

Screenshot 2024-08-15 at 6 12 46 PM Screenshot 2024-08-15 at 6 17 11 PM

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.

@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.

@bergeron bergeron marked this pull request as ready for review August 16, 2024 02:34
@bergeron bergeron requested a review from a team as a code owner August 16, 2024 02:34
@socket-security
Copy link
Copy Markdown

@@ -0,0 +1,58 @@
diff --git a/dist/chunk-FGAZXVKS.js b/dist/chunk-FGAZXVKS.js
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't have a PR to develop for this, since I plan to fix that with an actual package release. But patching for v12.1.0 and probably subsequent minor releases.

@darkwing darkwing added release-blocker This bug is blocking the next release release-12.1.0 Issue or pull request that will be included in release 12.1.0 labels Aug 16, 2024
linkType: hard

"@metamask/assets-controllers@npm:^33.0.0":
"@metamask/assets-controllers@npm:33.0.0":
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do I need to bump this on mobile as well? MetaMask/metamask-mobile#10562

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We will bump this on mobile too. Mobile won't consume this data until the PR you linked, so no hotfix just a regular fix.

@gambinish gambinish self-requested a review August 16, 2024 16:52
@bergeron bergeron merged commit 2870f59 into Version-v12.1.0 Aug 16, 2024
@bergeron bergeron deleted the brian/12.1.0-fix-fallback-conversion-rate branch August 16, 2024 17:17
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.1.0 Issue or pull request that will be included in release 12.1.0 release-blocker This bug is blocking the next release team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants