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: Fix all Engine type errors #7105

Merged
merged 4 commits into from
Sep 1, 2023
Merged

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Sep 1, 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

All errors in Engine.ts have been resolved. This file is frequently imported throughout the application, so fixing type errors here is essential for making progress with eliminating type errors.

A few errors were caused by dependency issues that will be resolved soon after additional dependency updates, but I made note of some cases that require further investigation and fixes.

As part of this effort, a EngineState type has been added as well. This will be useful in later refactors related to controller upgrades.

Issue

This relates to 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

Base automatically changed from fix-engine-controller-messenger-type-error to main September 1, 2023 11:39
@Gudahtt Gudahtt force-pushed the fix-additional-engine-type-errors branch from 62454ee to 3e6f9ae Compare September 1, 2023 11:40
@Gudahtt Gudahtt added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform labels Sep 1, 2023
@Gudahtt Gudahtt force-pushed the fix-additional-engine-type-errors branch from 3e6f9ae to b523431 Compare September 1, 2023 12:13
@Gudahtt Gudahtt marked this pull request as ready for review September 1, 2023 12:14
@Gudahtt Gudahtt requested a review from a team as a code owner September 1, 2023 12:14
@Gudahtt
Copy link
Member Author

Gudahtt commented Sep 1, 2023

@Gudahtt Gudahtt force-pushed the fix-additional-engine-type-errors branch from b523431 to fbff397 Compare September 1, 2023 12:41
app/core/Engine.ts Outdated Show resolved Hide resolved
Cal-L
Cal-L previously approved these changes Sep 1, 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

All errors in Engine.ts have been resolved. This file is frequently
imported throughout the application, so fixing type errors here is
essential for making progress with eliminating type errors. Resolving
these errors required migrating the AppConstants module to TypeScript
as well.

A few errors were caused by dependency issues that will be resolved
soon after additional dependency updates, but I made note of some cases
that require further investigation and fixes.

As part of this effort, a `BackgroundState` type has been added as
well. This will be useful in later refactors related to controller
upgrades.

This relates to MetaMask/mobile-planning#1226
@Gudahtt Gudahtt requested a review from Cal-L September 1, 2023 20:51
app/core/Engine.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@sethkfman sethkfman 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 Sep 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug C 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 11 Code Smells

70.5% 70.5% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@Gudahtt Gudahtt added No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Sep 1, 2023
@Gudahtt Gudahtt merged commit 5f2c7a8 into main Sep 1, 2023
14 checks passed
@Gudahtt Gudahtt deleted the fix-additional-engine-type-errors branch September 1, 2023 21:23
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2023
@metamaskbot metamaskbot added the release-7.8.0 Issue or pull request that will be included in release 7.8.0 label Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. release-7.8.0 Issue or pull request that will be included in release 7.8.0 team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants