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.
What does this PR?
After testing login routines for some time I finally identified a loophole that most probably causing login data getting corrupted.
Essentially if someone logged in with active or posting key and attempts to import any of keys under Manage Authorities section. What was happening is it overwrites all of private keys to the one imported by user after login.
This matches perfectly with one of reported by a user facing similar issue of being logged in with active but not able to use it yet not being logged out as well.
This is also directly related to pinCode related issue affecting the login data since pinCode is perquisite of managing authorities in app
Steps to reproduce
Login with any key other than master password, import some other key under Manage Authorities
Issue number
Screenshots/Video
BEFORE
https://github.com/ecency/ecency-mobile/assets/6298342/a134f7f4-1428-4ce8-a2c8-ef4bec7ea322
AFTER
https://github.com/ecency/ecency-mobile/assets/6298342/c5259d66-311d-4f2e-bc4d-4c9752f2e8a6