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

Cleanup: clearTimeout on useEffect for gas estimation and prevent state update on unmounted ConfirmTransactionBase #17804

Merged
merged 2 commits into from
Feb 17, 2023

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Feb 17, 2023

Explanation

  • Clears timeout in gas estimation useEffect hook to prevent memory leak
  • Fix ConfirmTransactionBase error message: "Can't perform a React state updated on an unmounted component"

Screenshots/Screencaps

Before

Screen Shot 2023-02-17 at 2 48 22 PM

warnings still exist after this PR, it should be less frequent.
Screen Shot 2023-02-17 at 4 31 28 PM

After

Manual Testing Steps

  • Create transactions
  • Interact with transactions by rejecting or confirming
  • Observe console

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@digiwand digiwand requested a review from a team as a code owner February 17, 2023 12:27
@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 [fcb1c75]
Page Load Metrics (1460 ± 66 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint96164114168
domContentLoaded12341893144812962
load12341932146013766
domInteractive12341893144812962
Bundle size diffs
  • background: 0 bytes
  • ui: 69 bytes
  • common: 0 bytes

@digiwand digiwand added area-transactions area-gas team-confirmations-secure-ux-PR PRs from the confirmations team needs-qa Label will automate into QA workspace labels Feb 17, 2023
@bschorchit bschorchit added the team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead label Feb 17, 2023
@digiwand digiwand removed the needs-qa Label will automate into QA workspace label Feb 17, 2023
@digiwand digiwand merged commit 7d1dc7f into develop Feb 17, 2023
@digiwand digiwand deleted the clean-add-clearTimeout-fix-unmounted-state-update branch February 17, 2023 15:11
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-gas area-transactions rc-cherry-picked team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead team-confirmations-secure-ux-PR PRs from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants