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

feat: migrate AppStateController to inherit from BaseController V2 #28784

Merged

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Nov 27, 2024

Description

This PR migrate AppStateController to inherit from BaseController V2

Open in GitHub Codespaces

Related issues

Fixes: #25916

Manual testing steps

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.

@cryptodev-2s cryptodev-2s self-assigned this Nov 27, 2024
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner November 27, 2024 22:27
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.

@cryptodev-2s cryptodev-2s marked this pull request as draft November 27, 2024 22:31
@cryptodev-2s cryptodev-2s force-pushed the cryptodev2s/migrate-app-state-controller-to-base-controller-v2 branch 8 times, most recently from 0c075a8 to ae7e263 Compare November 28, 2024 20:15
@metamaskbot
Copy link
Collaborator

Builds ready [ae7e263]
Page Load Metrics (2124 ± 90 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31724871750699336
domContentLoaded16962430209019393
load17112457212418890
domInteractive277942147
backgroundConnect7190374019
firstReactRender156830199
getState318964209
initialActions01000
loadScripts12521897158915977
setupStore612821
uiStartup202828062431212102
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.24 KiB (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@cryptodev-2s cryptodev-2s force-pushed the cryptodev2s/migrate-app-state-controller-to-base-controller-v2 branch from ae7e263 to 5c939d9 Compare November 28, 2024 22:36
@cryptodev-2s cryptodev-2s marked this pull request as ready for review November 28, 2024 22:36
@metamaskbot
Copy link
Collaborator

Builds ready [5c939d9]
Page Load Metrics (1895 ± 57 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint71622181840286138
domContentLoaded16182200186511957
load16382214189511957
domInteractive27583484
backgroundConnect990322512
firstReactRender1696302311
getState482061063517
initialActions01000
loadScripts12011776143312158
setupStore710810
uiStartup184327652216212102
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.24 KiB (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [da09c89]
Page Load Metrics (1741 ± 65 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15632007174913163
domContentLoaded15341981171612861
load15451990174113565
domInteractive24376577838
backgroundConnect669282010
firstReactRender159224188
getState45172853014
initialActions01000
loadScripts10881579130013063
setupStore6481295
uiStartup17682442199218187
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.15 KiB (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

A few minor things, but otherwise looks pretty good to me!

app/scripts/controllers/app-state-controller.ts Outdated Show resolved Hide resolved
app/scripts/controllers/app-state-controller.ts Outdated Show resolved Hide resolved
app/scripts/controllers/app-state-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/app-state-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/app-state-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/app-state-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/app-state-controller.test.ts Outdated Show resolved Hide resolved
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner December 3, 2024 00:49
@metamaskbot
Copy link
Collaborator

Builds ready [29e80ef]
Page Load Metrics (2263 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32726742083554266
domContentLoaded19932616222719192
load199826462263208100
domInteractive297652188
backgroundConnect6206354521
firstReactRender169231199
getState1464481968440
initialActions01000
loadScripts15052010170616579
setupStore78115168
uiStartup228033222685327157
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.15 KiB (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

One more thing.

app/scripts/controllers/app-state-controller.ts Outdated Show resolved Hide resolved
app/scripts/controllers/app-state-controller.test.ts Outdated Show resolved Hide resolved
@cryptodev-2s cryptodev-2s requested a review from mcmire December 3, 2024 23:06
@metamaskbot
Copy link
Collaborator

Builds ready [ad49836]
Page Load Metrics (2005 ± 71 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint17572340200414670
domContentLoaded17472300196614871
load17592338200514971
domInteractive267139147
backgroundConnect993352311
firstReactRender1696282211
getState1053301605727
initialActions01000
loadScripts13331777153412460
setupStore77813157
uiStartup204931452353258124
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.15 KiB (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

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

LGTM!

I tested this branch locally and I didn't experience issues

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Tested calling eth_requestAccounts when the extension was locked. Once it was unlocked then the request went through.

Also tried setting the autolock timer to 1 minute, and indeed the extension autolocked after 1 minute.

Copy link
Contributor

@desi desi left a comment

Choose a reason for hiding this comment

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

LGTM based on code and thumbs up from others around review and testing

@cryptodev-2s cryptodev-2s added this pull request to the merge queue Dec 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 4, 2024
@mcmire mcmire added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit fc06d34 Dec 4, 2024
75 checks passed
@mcmire mcmire deleted the cryptodev2s/migrate-app-state-controller-to-base-controller-v2 branch December 4, 2024 22:25
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2024
@metamaskbot metamaskbot added the release-12.10.0 Issue or pull request that will be included in release 12.10.0 label Dec 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.10.0 Issue or pull request that will be included in release 12.10.0 team-wallet-framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate AppStateController to BaseController v2
7 participants