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

refactor: Use selectors for preferences controller state access #6775

Merged

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Jul 10, 2023

Description

Preferences controller Redux state is now accessed excusively through selectors. This makes future state changes easier to manage.

Most of these changes consist of replacing the direct access to PreferencesController State, by selectors.

Issue

Relates to https://github.com/MetaMask/mobile-planning/issues/1017

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@cryptodev-2s cryptodev-2s added the No QA Needed Apply this label when your PR does not need any QA effort. label Jul 10, 2023
@cryptodev-2s cryptodev-2s self-assigned this Jul 10, 2023
@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.

Gudahtt
Gudahtt previously approved these changes Jul 10, 2023
Copy link
Member

@Gudahtt Gudahtt 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'll start the e2e tests

@cryptodev-2s cryptodev-2s force-pushed the use-selectors-for-preferences-controllers-state-access branch from e2ff8ac to 7f9e507 Compare July 11, 2023 12:25
@Gudahtt
Copy link
Member

Gudahtt commented Jul 11, 2023

Looks like there are new conflicts on this one

@cryptodev-2s cryptodev-2s force-pushed the use-selectors-for-preferences-controllers-state-access branch from 7f9e507 to 022f47f Compare July 11, 2023 21:19
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner July 11, 2023 21:19
@cryptodev-2s
Copy link
Contributor Author

Looks like there are new conflicts on this one

I just did a rebase

Gudahtt
Gudahtt previously approved these changes Jul 13, 2023
@cryptodev-2s cryptodev-2s force-pushed the use-selectors-for-preferences-controllers-state-access branch from e7ab082 to cc85194 Compare July 13, 2023 12:12
@cryptodev-2s cryptodev-2s requested a review from mcmire July 13, 2023 12:36
@Gudahtt Gudahtt dismissed their stale review July 13, 2023 13:45

Investigating failed e2e tests

@Gudahtt
Copy link
Member

Gudahtt commented Jul 13, 2023

Failed test run here: https://app.bitrise.io/build/c51da20e-ac10-4f37-8964-b3810a133dd6
Currently investigating

@cryptodev-2s cryptodev-2s force-pushed the use-selectors-for-preferences-controllers-state-access branch 3 times, most recently from 3623cd9 to 5918c46 Compare July 20, 2023 16:38
@cryptodev-2s
Copy link
Contributor Author

Successful e2e https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3c7193e0-94d6-440e-a910-9a5551cce290

@cryptodev-2s cryptodev-2s force-pushed the use-selectors-for-preferences-controllers-state-access branch from 5918c46 to a19d9e2 Compare July 20, 2023 19:11
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@sonarcloud
Copy link

sonarcloud bot commented Jul 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

61.2% 61.2% Coverage
0.0% 0.0% Duplication

@cryptodev-2s cryptodev-2s merged commit 4aa6cda into main Jul 20, 2023
11 checks passed
@cryptodev-2s cryptodev-2s deleted the use-selectors-for-preferences-controllers-state-access branch July 20, 2023 19:54
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2023
@metamaskbot metamaskbot added the release-7.5.0 Issue or pull request that will be included in release 7.5.0 label Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.5.0 Issue or pull request that will be included in release 7.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants