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: Adding migration 125 to remove Deprecated TxController Key from state #26267

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

NiranjanaBinoy
Copy link
Contributor

@NiranjanaBinoy NiranjanaBinoy commented Jul 31, 2024

Description

We are deleting the depreciated Txcontroller key to optimize state management and reduce clutter.

Open in GitHub Codespaces

Related issues

Fixes: #26067

Manual testing steps

Method 1:

  1. Load a build older than 11.7.0 (I worked with 11.6.0)
  2. Send a transaction
  3. Update to a local build created from develop
  4. Inspect the background state and confirm that TxController:{transactions:[]} is present in the background state. and the meta: {version: (less than 124)}.
  5. Update to a local build created from this PR branch
  6. Reload the app and inspect the background to confirm TxController is no longer present and the version is updated to 125.

Method 2:

  1. Load the app from this PR branch
  2. Run chrome.storage.local.get(({ data, meta }) => chrome.storage.local.set({ data: { ...data, TxController: {transactions:[]} }, meta: {...meta, version: 124} }, () => { window.location.reload() }))
  3. Inspect the background state and confirm that TxController:{transactions:[]} is present in the background state. and the meta: {version: 124}.
  4. Build the branch again
  5. Reload the app and inspect the background to confirm TxController is no longer present and the version is updated to 125.

Screenshots/Recordings

Before

After

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.

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.

@NiranjanaBinoy NiranjanaBinoy self-assigned this Jul 31, 2024
@NiranjanaBinoy NiranjanaBinoy changed the title Fix(26067 ): Adding migration 125 to remove TxController Key. fix: Adding migration 125 to remove TxController Key. Jul 31, 2024
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

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

Project coverage is 69.98%. Comparing base (3dec722) to head (35ff595).
Report is 10 commits behind head on develop.

Files Patch % Lines
app/scripts/migrations/125.ts 90.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26267      +/-   ##
===========================================
+ Coverage    69.97%   69.98%   +0.01%     
===========================================
  Files         1411     1410       -1     
  Lines        49995    49910      -85     
  Branches     13805    13784      -21     
===========================================
- Hits         34981    34926      -55     
+ Misses       15014    14984      -30     

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

@metamaskbot
Copy link
Collaborator

Builds ready [537c916]
Page Load Metrics (414 ± 337 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint613491357636
domContentLoaded96631199
load392538414701337
domInteractive96631199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 743 Bytes (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@NiranjanaBinoy NiranjanaBinoy changed the title fix: Adding migration 125 to remove TxController Key. fix: Adding migration 125 to remove Deprecated TxController Key from state Aug 1, 2024
@NiranjanaBinoy NiranjanaBinoy marked this pull request as ready for review August 1, 2024 14:33
@NiranjanaBinoy NiranjanaBinoy requested a review from a team as a code owner August 1, 2024 14:33
Copy link

sonarcloud bot commented Aug 1, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [35ff595]
Page Load Metrics (224 ± 223 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint623001095125
domContentLoaded9101292512
load391754224465223
domInteractive9101292512
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 743 Bytes (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@hjetpoluru hjetpoluru self-requested a review August 1, 2024 18:33
Copy link
Contributor

@hjetpoluru hjetpoluru left a comment

Choose a reason for hiding this comment

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

LGTM

@NiranjanaBinoy NiranjanaBinoy merged commit 40150cd into develop Aug 2, 2024
75 checks passed
@NiranjanaBinoy NiranjanaBinoy deleted the incident-764-migration-125 branch August 2, 2024 01:38
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Aug 2, 2024
@gauthierpetetin gauthierpetetin added release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.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.3.0 Issue or pull request that will be included in release 12.3.0 team-extension-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Remove Deprecated TxController Key from TransactionController State
5 participants