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 currency rate controller state access #6752

Merged

Conversation

cryptodev-2s
Copy link
Contributor

Description

Currency Rate 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 CurrencyRateController State, by selectors.

Issue

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

Checklist

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

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
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@cryptodev-2s cryptodev-2s marked this pull request as draft July 6, 2023 14:46
@cryptodev-2s cryptodev-2s force-pushed the use-selectors-for-currency-rate-controller-state-access branch from cd16776 to 52b87b9 Compare July 6, 2023 15:26
@cryptodev-2s cryptodev-2s force-pushed the use-selectors-for-currency-rate-controller-state-access branch from 52b87b9 to c20ad78 Compare July 6, 2023 15:48
@cryptodev-2s cryptodev-2s requested a review from Cal-L July 6, 2023 16:16
@cryptodev-2s cryptodev-2s marked this pull request as ready for review July 6, 2023 16:16
@cryptodev-2s cryptodev-2s requested a review from Gudahtt July 6, 2023 16:18
Gudahtt
Gudahtt previously approved these changes Jul 6, 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.

Looks great! Just a couple of small suggestions

app/selectors/currencyRateController.ts Outdated Show resolved Hide resolved
app/selectors/currencyRateController.ts Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jul 6, 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 0 Code Smells

77.8% 77.8% Coverage
0.0% 0.0% Duplication

@Gudahtt Gudahtt added the No QA Needed Apply this label when your PR does not need any QA effort. label Jul 7, 2023
@cryptodev-2s cryptodev-2s self-assigned this Jul 7, 2023
@Gudahtt
Copy link
Member

Gudahtt commented Jul 7, 2023

@cryptodev-2s cryptodev-2s merged commit 89249a5 into main Jul 7, 2023
12 checks passed
@cryptodev-2s cryptodev-2s deleted the use-selectors-for-currency-rate-controller-state-access branch July 7, 2023 13:08
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2023
@metamaskbot metamaskbot added the release-7.4.0 Issue or pull request that will be included in release 7.4.0 label Jul 7, 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.4.0 Issue or pull request that will be included in release 7.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants