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: catch error for getTokenStandardAndDetails #26269

Merged
merged 2 commits into from
Aug 26, 2024
Merged

Conversation

sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Aug 1, 2024

Description

Related to this reported Sentry error: https://metamask.sentry.io/issues/5660074561/?environment=production&project=273505&query=firstRelease%3A12.0.0&referrer=issue-stream&sort=freq&statsPeriod=90d&stream_index=22

Inside Import-nfts-modal.js we call getTokenStandardAndDetails without catching the case where this call fails.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. To mock this behavior you can go to fct getTokenStandardAndDetails and throw an error there
  2. Import any NFT
  3. The import NFT modal should not stay hanging after import

Screenshots/Recordings

Before

Screen.Recording.2024-08-01.at.07.56.42.mov

After

Screen.Recording.2024-08-01.at.07.57.34.mov

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.

@sahar-fehri sahar-fehri requested a review from a team as a code owner August 1, 2024 06:03
Copy link
Contributor

github-actions bot commented Aug 1, 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.

@metamaskbot
Copy link
Collaborator

Builds ready [2c587ed]
Page Load Metrics (550 ± 423 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint673691297938
domContentLoaded9162343718
load393092550881423
domInteractive9162343718
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 18 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.09%. Comparing base (ee52d48) to head (af18170).
Report is 14 commits behind head on develop.

Files Patch % Lines
.../multichain/import-nfts-modal/import-nfts-modal.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26269      +/-   ##
===========================================
- Coverage    70.09%   70.09%   -0.00%     
===========================================
  Files         1413     1413              
  Lines        49254    49255       +1     
  Branches     13768    13768              
===========================================
  Hits         34524    34524              
- Misses       14730    14731       +1     

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

Copy link

Copy link
Contributor

@gambinish gambinish left a comment

Choose a reason for hiding this comment

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

Approving, but leaving a curious comment

@metamaskbot
Copy link
Collaborator

Builds ready [af18170]
Page Load Metrics (82 ± 23 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint773551125828
domContentLoaded48271784923
load54271824723
domInteractive187129157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 18 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@sahar-fehri sahar-fehri merged commit d9e989e into develop Aug 26, 2024
78 checks passed
@sahar-fehri sahar-fehri deleted the fix/fix-import-nft branch August 26, 2024 19:00
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2024
@metamaskbot metamaskbot added the release-12.5.0 Issue or pull request that will be included in release 12.5.0 label Aug 26, 2024
@gauthierpetetin gauthierpetetin added release-12.4.0 Issue or pull request that will be included in release 12.4.0 and removed release-12.5.0 Issue or pull request that will be included in release 12.5.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.4.0 Issue or pull request that will be included in release 12.4.0 team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants