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: Update controller packages to core v49 #7125

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Sep 4, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add the appropiate QA label when dev review is completed
    • needs-qa: PR requires manual QA.
    • No QA/E2E only: PR does not require any manual QA effort. Prior to merging, ensure that you have successful end-to-end test runs in Bitrise.
    • Spot check on release build: PR does not require feature QA but needs non-automated verification. In the description section, provide test scenarios. Add screenshots, and or recordings of what was tested.
  5. Add QA Passed label when QA has signed off (Only required if the PR was labeled with needs-qa)
  6. Add your team's label, i.e. label starting with team- (or external-contributor label if your not a MetaMask employee)

Description

The controller packages have been updated to match those present in the core monorepo release v49. See this changelog for details: https://github.com/MetaMask/core/releases/tag/v49.0.0

The main breaking change is that the NetworkController state property network has been split into networkId and networkStatus.

Screenshots/Recordings

https://recordit.co/GXEdxk9uNp

Wasn't sure exactly what to manually test, but I confirmed that balance updates and incoming transactions seem to be working well, as well as network switching.

Issue

Resolves https://github.com/MetaMask/mobile-planning/issues/1226

Checklist

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

@socket-security
Copy link

socket-security bot commented Sep 4, 2023

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@metamask/gas-fee-controller 4.0.1...5.0.0 None +3/-3 3 MB metamaskbot
@metamask/network-controller 7.0.0...8.0.0 None +2/-2 2.85 MB metamaskbot
@metamask/transaction-controller 4.0.1...5.0.0 None +5/-3 3.13 MB metamaskbot
@metamask/assets-controllers 6.0.0...7.0.0 None +3/-3 3.45 MB metamaskbot

@socket-security
Copy link

socket-security bot commented Sep 4, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: nonce-tracker@1.1.0

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch from 5c480d1 to ba34220 Compare September 4, 2023 19:37
@Gudahtt Gudahtt force-pushed the use-selectors-for-core-network-controller-state branch from 21c1980 to cfceb7f Compare September 5, 2023 17:22
Base automatically changed from use-selectors-for-core-network-controller-state to main September 5, 2023 21:10
@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch 3 times, most recently from eff6bb9 to 4f070f6 Compare September 12, 2023 23:35
@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch from 4f070f6 to 06b23bf Compare September 16, 2023 18:23
@Gudahtt
Copy link
Member Author

Gudahtt commented Sep 16, 2023

@SocketSecurity ignore nonce-tracker@1.1.0

This is our package

@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch from 06b23bf to 108542d Compare September 16, 2023 18:50
@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (3fa6545) 34.60% compared to head (77f0cb8) 34.63%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7125      +/-   ##
==========================================
+ Coverage   34.60%   34.63%   +0.03%     
==========================================
  Files        1017     1017              
  Lines       27104    27123      +19     
  Branches     2197     2198       +1     
==========================================
+ Hits         9379     9394      +15     
- Misses      17236    17240       +4     
  Partials      489      489              
Files Coverage Δ
...pp/components/UI/ApproveTransactionReview/index.js 3.88% <ø> (ø)
app/components/UI/MessageSign/MessageSign.tsx 68.29% <ø> (ø)
app/components/UI/PersonalSign/PersonalSign.tsx 75.00% <ø> (ø)
app/components/UI/TypedSign/index.js 66.07% <ø> (ø)
app/components/Views/Asset/index.js 2.98% <ø> (ø)
app/store/migrations.js 40.56% <100.00%> (+3.54%) ⬆️
app/core/Engine.ts 53.74% <0.00%> (-0.21%) ⬇️
app/components/UI/WatchAssetRequest/index.js 13.04% <0.00%> (-1.25%) ⬇️
app/components/Views/TransactionsView/index.js 8.92% <0.00%> (ø)
app/core/BackgroundBridge/BackgroundBridge.js 5.40% <0.00%> (+0.04%) ⬆️
... and 1 more

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

@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch 3 times, most recently from e152c95 to 5075548 Compare September 18, 2023 19: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.

@Gudahtt Gudahtt changed the base branch from main to address-book-key-by-chain-id September 18, 2023 19:27
@Gudahtt

This comment was marked as resolved.

@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch 2 times, most recently from 09a8ade to 14e4880 Compare September 20, 2023 21:01
@Gudahtt
Copy link
Member Author

Gudahtt commented Sep 20, 2023

This has been rebased onto #7197, and the migration renamed from 23 to 24 (a new migration was added on main)

@Gudahtt Gudahtt force-pushed the address-book-key-by-chain-id branch 3 times, most recently from 3570cfe to 92e54ff Compare September 22, 2023 17:08
@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch from 14e4880 to 84dfcab Compare September 22, 2023 17:16
Base automatically changed from address-book-key-by-chain-id to main September 22, 2023 20:25
@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch from 84dfcab to 7f5d70d Compare September 22, 2023 20:26
The controller packages have been updated to match those present in the
core monorepo release v49. See this changelog for details:
https://github.com/MetaMask/core/releases/tag/v49.0.0
@Gudahtt Gudahtt force-pushed the update-controller-packages-v49 branch from 7f5d70d to 77f0cb8 Compare September 26, 2023 14:34
@Gudahtt Gudahtt marked this pull request as ready for review September 26, 2023 14:35
@Gudahtt Gudahtt requested a review from a team as a code owner September 26, 2023 14:35
@Gudahtt Gudahtt added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Sep 26, 2023
@sonarcloud
Copy link

sonarcloud bot commented Sep 26, 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 5 Code Smells

62.5% 62.5% Coverage
0.0% 0.0% Duplication

@Gudahtt Gudahtt changed the title Update controller packages to core v49 refactor: Update controller packages to core v49 Sep 26, 2023
@Gudahtt
Copy link
Member Author

Gudahtt commented Sep 26, 2023

@cortisiko cortisiko added QA in Progress QA has started on the feature. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Sep 26, 2023
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@Cal-L Cal-L removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 26, 2023
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

No regressions to report. ✅ ✅ looks good to me.

@cortisiko cortisiko added QA Passed A successful QA run through has been done and removed QA in Progress QA has started on the feature. labels Sep 26, 2023
@Gudahtt Gudahtt merged commit 3635e72 into main Sep 26, 2023
29 of 33 checks passed
@Gudahtt Gudahtt deleted the update-controller-packages-v49 branch September 26, 2023 20:15
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.9.0 team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants