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

fix: patch handling of missing token price #8421

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Conversation

bergeron
Copy link
Contributor

@bergeron bergeron commented Jan 28, 2024

Description

Patches MetaMask/core#3687

Fixes issue where importing 1 un-pricable token causes all tokens to lose prices.

Related issues

Fixes:

Manual testing steps

  1. Open a wallet containing erc20 tokens
  2. Import a token for which there is no pricing data (e.g. manually import 0xc7ad37edae28d8cd04bbe4a6ecf072314faed1be)
  3. Switch to a different chain, then switch back
  4. Tokens with pricing information should still show fiat $ value

Screenshots/Recordings

Before

Screenshot 2024-01-28 at 11 55 56 AM

After

Screenshot 2024-01-28 at 12 09 09 PM

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.

@bergeron bergeron requested a review from a team as a code owner January 28, 2024 20:09
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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (266154a) 40.42% compared to head (013573f) 40.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8421   +/-   ##
=======================================
  Coverage   40.42%   40.42%           
=======================================
  Files        1239     1239           
  Lines       29976    29976           
  Branches     2869     2869           
=======================================
  Hits        12117    12117           
  Misses      17168    17168           
  Partials      691      691           

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

Copy link

sonarcloud bot commented Jan 28, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@tommasini tommasini left a comment

Choose a reason for hiding this comment

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

LGTM!

@sethkfman sethkfman added team-assets Run Smoke E2E Triggers smoke e2e on Bitrise labels Jan 29, 2024
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/90b46fd5-c6ed-4f84-a048-b265023f8612
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@sethkfman sethkfman merged commit b125fe1 into main Jan 29, 2024
36 of 37 checks passed
@sethkfman sethkfman deleted the brian/price-fetch branch January 29, 2024 18:52
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2024
@metamaskbot metamaskbot added the release-7.16.0 Issue or pull request that will be included in release 7.16.0 label Jan 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.16.0 Issue or pull request that will be included in release 7.16.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-assets team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants