MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.17k stars 1.12k forks source link

chore: #12184 MVP split engine file #12366

Open Cal-L opened 1 day ago

Cal-L commented 1 day ago

Description

This PR establishes a pattern for splitting out controllers from the main Engine.ts file, which provides the following benefits

The POC here applies to the AccountsController initialization logic, which has been mostly abstracted out into AccountsController directory. This pattern should be applicable to other controllers in the Engine file as well.

This pattern also enables us to redirect users to vault recovery in the event of controller initialization failures and should reduce the chances of users being "bricked". These changes may be introduced in future interations

Related issues

Fixes: #12184

Manual testing steps

The changes should not affect app behavior

Screenshots/Recordings

Before

After

App still runs normally

https://github.com/user-attachments/assets/dc7fc017-1a26-4681-b84a-e04c63952281

Pre-merge author checklist

Pre-merge reviewer checklist

github-actions[bot] commented 1 day ago

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.

github-actions[bot] commented 20 hours ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8443cc7c39d35b804f362892a6130188495e1ddc Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/897a1c5f-e79a-4635-af2f-d45d7ade7e75

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
sonarcloud[bot] commented 16 hours ago

Quality Gate Failed Quality Gate failed

Failed conditions
53.7% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

Cal-L commented 15 hours ago

Skipping sonar failure (Engine.ts) since this PR just removes code from the file

github-actions[bot] commented 15 hours ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: f69b6d3682966c456a6dd4e36f412a6511be5385 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e8068757-a06a-41a0-900c-d02ca1f04e4b

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request