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(20853): improve the logic to handle fetch #20977

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Conversation

DDDDDanica
Copy link
Contributor

@DDDDDanica DDDDDanica commented Sep 20, 2023

Description

Fix: #20853
For sentry error:
https://metamask.sentry.io/issues/3404840685/events/a304e0a6b9784a7780254191cdb0dc59/?project=273505
Screenshot 2023-09-20 at 21 37 05

In UI level, the error should be captured and contribute to a state that renders the link. Therefore, we do not need extra UI element to deal with the error. When the error shows up, we want to capture in the catch and set that state again just in case.

Manual testing steps

  1. change {shouldShowNetworkInfo && <NewNetworkInfo />} to <NewNetworkInfo /> in ui/pages/routes/routes.component.js for testing purpose
  2. Enable auto token detection
  3. go to network and block the request starting from 0x
  4. You should see the in the new token information pop up.

Screenshots/Recordings

Before

[screenshot]

After

network-info.mov

Related issues

_Fixes #20853

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • 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.

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

@metamaskbot
Copy link
Collaborator

Builds ready [2fc4b50]
Page Load Metrics (1626 ± 43 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint123180147178
domContentLoaded1459177016258943
load1459177016268943
domInteractive1459177016258943
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 264 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Patch coverage: 87.50% and project coverage change: +0.01% 🎉

Comparison is base (29ac616) 68.42% compared to head (7c770a3) 68.42%.
Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #20977      +/-   ##
===========================================
+ Coverage    68.42%   68.42%   +0.01%     
===========================================
  Files         1006     1006              
  Lines        40209    40213       +4     
  Branches     10752    10754       +2     
===========================================
+ Hits         27510    27515       +5     
+ Misses       12699    12698       -1     
Files Changed Coverage Δ
...components/ui/new-network-info/new-network-info.js 80.95% <87.50%> (+4.64%) ⬆️

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

@gauthierpetetin gauthierpetetin added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 21, 2023
albertolive
albertolive previously approved these changes Sep 22, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [7c770a3]
Page Load Metrics (1524 ± 44 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint117188136188
domContentLoaded1410169615249144
load1410169715249144
domInteractive1410169615249144
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 264 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@DDDDDanica DDDDDanica merged commit 5f368d5 into develop Sep 22, 2023
9 checks passed
@DDDDDanica DDDDDanica deleted the fix/20853-403 branch September 22, 2023 16:11
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2023
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 22, 2023
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.3.0 Issue or pull request that will be included in release 11.3.0 team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Fetch failed with status '403': '' in new-network-info
6 participants