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: Create migration 59 to fix undefined selectedAccount #12177

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

Cal-L
Copy link
Contributor

@Cal-L Cal-L commented Nov 5, 2024

Description

This PR addresses a crasher related to an undefined selectedAccount causing the AccountsController to throw an error. Under this scenario, the solution is to set selectedAccount to an empty string, which the AccountsController will automatically reset the selectedAccount.

PR similar to #11866 but not the same

Related issues

Fixes: #11488

Manual testing steps

  1. Building on main, create a wallet and kill the app
  2. Create a migration that sets selectedAccount on the AccountsController to be undefined
  3. Run the app, notice it encounters the error. Kill the app
  4. Run this branch, which includes migration 59. Notice you are no longer blocked and can log in
  5. Will see an account selected by default after landing on wallet

Screenshots/Recordings

Before

The error that users eventually see as a result of the migration failures
Screenshot 2024-11-04 at 11 21 55 PM

After

After applying migration
https://github.com/user-attachments/assets/e959c8d9-5dfd-4b69-8f4d-16689bf66d95

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@Cal-L Cal-L requested a review from a team as a code owner November 5, 2024 08:26
Copy link
Contributor

github-actions bot commented Nov 5, 2024

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.

@Cal-L Cal-L added Run Smoke E2E Triggers smoke e2e on Bitrise No QA Needed Apply this label when your PR does not need any QA effort. needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) and removed No QA Needed Apply this label when your PR does not need any QA effort. labels Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 1955898
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6b487a9b-349a-4f8c-9e52-d5e625a829e1

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

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Cal-L
Copy link
Contributor Author

Cal-L commented Nov 5, 2024

Bitrise failure not related to this PR

Copy link

sonarqubecloud bot commented Nov 5, 2024

@Cal-L Cal-L added this pull request to the merge queue Nov 5, 2024
Merged via the queue into main with commit af62e1b Nov 5, 2024
36 of 37 checks passed
@Cal-L Cal-L deleted the fix/11488-undefined-selectedAccount branch November 5, 2024 23:58
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 5, 2024
@gauthierpetetin gauthierpetetin added the release-7.36.0 Issue or pull request that will be included in release 7.36.0 label Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.36.0 Issue or pull request that will be included in release 7.36.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Archived in project
4 participants