fix: MLS account not being deleted when logging out - WPB-15774 #2572
+8
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Context: When logging out from MLS account (userA) and logging in with other account (userB) and logging out again it will results in weird behavior (crashes, session corrupted popup or login screen showing expired session message..)
-> app behaves inconsistently when logging out from MLS account.
Causes: When logging out from MLS account, we're deleting everything related to the active session except the account itself because some completion block is not called whereas it should be - whether it is a MLS or Proteus account (works fine if we only test with Proteus accounts).
Solution: Ensure the code responsible to delete account data is properly called when logging out from a MLS account by removing usage of dispatch group.
Testing
Log in with MLS account
Log out
Log in with other account (MLS or Proteus)
Log out
..
-> app should behave consistently when logging in / out from MLS or Proteus accounts (no corrupted session pop up, no crash, no expired session message on login screen..)
Checklist
[WPB-XXX]
.