Closed noumantahir closed 1 year ago
Added account verification mechanism on startup, account switch and logout if malformed keys data is detected. instead of wiping account data without notice, app now asks to verification and assist with prefilled username
What does this PR?
After testing a number of scenarios and trying to recreate the environment being faced by users, added a bunch snippets to help avoid embarrassing situations
1 - purges malformed accounts 2 - logs out of app instead of logging into malformed account 3 - rearranged logout structure to avoid creating an undefined auth data state 4 - moved isLogingOut state to uiReducer so it gets reset on every app launch if routine is interupted for some reason
Screenshots/Video
showing toast when auto detecting malformed user data detected on launch and when switching to logged in user after logging out![Screenshot 2023-05-24 at 5 51 40 PM](https://github.com/ecency/ecency-mobile/assets/6298342/e2668788-1ef8-44d5-8e16-11e8b4709cfc)
showing logout prompt if invalid account detected regular account switch![Screenshot 2023-05-24 at 5 54 35 PM](https://github.com/ecency/ecency-mobile/assets/6298342/87f3a4aa-8ab5-4bf9-a25f-3c0b278a1e00)
refine text button account switch sheet![Screenshot 2023-05-24 at 6 07 23 PM](https://github.com/ecency/ecency-mobile/assets/6298342/d5063c0b-05d5-49bf-a45b-85b752af31bf)
using in app action modal instead of OptionsModal![Screenshot 2023-05-24 at 6 07 31 PM](https://github.com/ecency/ecency-mobile/assets/6298342/a45423c9-6e0d-475f-8366-a568ca9fe2d0)