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: replace last usages of legacy gas fee polling with polling by networkClientId #24065

Merged
merged 10 commits into from
Apr 17, 2024

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Apr 16, 2024

Description

#23010 made initial changes to replace the GasFeeController's legacy gas fee polling in favor of polling via networkClientId. It was discovered that there are still lingering instances of the legacy gas fee polling which were causing double polling to occur since the legacy and networkClientId based polling run on separate loops. This PR fixes this by replacing those remaining legacy gas fee polling usages.

Open in GitHub Codespaces

Related issues

Fixes: #23010

Manual testing steps

  1. Open background console -> Network tab
  2. Open Extension Popup -> send -> enter address and amount -> next
  3. Background console network tab should now start showing one single network request every 10s to the gas api endpoint

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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.

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.

@jiexi jiexi self-assigned this Apr 16, 2024
@jiexi jiexi changed the title Jl/fix remaining gas fee polling fix: replace legacy gas fee polling actions with polling by networkClientId Apr 16, 2024
@jiexi jiexi changed the title fix: replace legacy gas fee polling actions with polling by networkClientId fix: replace last usages of legacy gas fee polling actions with polling by networkClientId actions Apr 16, 2024
@jiexi jiexi changed the title fix: replace last usages of legacy gas fee polling actions with polling by networkClientId actions fix: replace last usages of legacy gas fee pollin with polling by networkClientId Apr 16, 2024
@jiexi jiexi added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Apr 16, 2024
@jiexi jiexi marked this pull request as ready for review April 16, 2024 22:35
@jiexi jiexi requested review from a team as code owners April 16, 2024 22:35
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 61.53846% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 67.59%. Comparing base (15fc955) to head (c7accb4).

Files Patch % Lines
ui/ducks/send/send.js 62.50% 3 Missing ⚠️
...saction-base/confirm-transaction-base.component.js 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24065      +/-   ##
===========================================
- Coverage    67.59%   67.59%   -0.00%     
===========================================
  Files         1250     1250              
  Lines        48987    49005      +18     
  Branches     12792    12802      +10     
===========================================
+ Hits         33110    33122      +12     
- Misses       15877    15883       +6     

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

@jiexi jiexi changed the title fix: replace last usages of legacy gas fee pollin with polling by networkClientId fix: replace last usages of legacy gas fee polling with polling by networkClientId Apr 16, 2024
BelfordZ
BelfordZ previously approved these changes Apr 16, 2024
Copy link
Contributor

@BelfordZ BelfordZ left a comment

Choose a reason for hiding this comment

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

smell ya later, old polling!

@metamaskbot
Copy link
Collaborator

Builds ready [a8d0d2f]
Page Load Metrics (1296 ± 645 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint793401337335
domContentLoaded117128147
load66290912961343645
domInteractive117128147
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -214 Bytes (-0.01%)
  • ui: 145 Bytes (0.00%)
  • common: -203 Bytes (-0.00%)

adonesky1
adonesky1 previously approved these changes Apr 16, 2024
Copy link
Contributor

@adonesky1 adonesky1 left a comment

Choose a reason for hiding this comment

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

LGTM!

jpuri
jpuri previously approved these changes Apr 17, 2024
Copy link
Contributor

@jpuri jpuri left a comment

Choose a reason for hiding this comment

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

I reviewed all confirmation components related code and it looks good 👍

@adonesky1 adonesky1 dismissed stale reviews from jpuri, BelfordZ, and themself via cc492cb April 17, 2024 14:46
@metamaskbot
Copy link
Collaborator

Builds ready [cc492cb]
Page Load Metrics (1327 ± 661 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint733931519244
domContentLoaded107032178
load61313313271377661
domInteractive107032178
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -214 Bytes (-0.01%)
  • ui: 145 Bytes (0.00%)
  • common: -203 Bytes (-0.00%)

@adonesky1
Copy link
Contributor

adonesky1 commented Apr 17, 2024

Wait actually I might be seeing an issue where polling continues after the send flow is closed.

Ok nevermind was a fluke. This appears to be working as expected!

@metamaskbot
Copy link
Collaborator

Builds ready [c7accb4]
Page Load Metrics (2303 ± 547 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint723841527938
domContentLoaded1083332010
load59365323031140547
domInteractive1083332010
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -214 Bytes (-0.01%)
  • ui: 145 Bytes (0.00%)
  • common: -203 Bytes (-0.00%)

@adonesky1 adonesky1 merged commit 5f67907 into develop Apr 17, 2024
68 of 69 checks passed
@adonesky1 adonesky1 deleted the jl/fix-remaining-gas-fee-polling branch April 17, 2024 19:18
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2024
@metamaskbot metamaskbot added the release-11.16.0 Issue or pull request that will be included in release 11.16.0 label Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.16.0 Issue or pull request that will be included in release 11.16.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead team-wallet-api-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants