[CM-3176] Possible fix for credential disappearance
Reason for Pull Request
-
Bug fix
Link for jira ticket
Root cause
-
claimRequestStatus
tells us if credential has been accepted and stored. Even though claimRequestStatus was being set toCLAIM_REQUEST_SUCCESS
. The storage was not getting updated to reflect the state. So, if user kills the app or goes out of the app. The storage won't reflect correct status and hydration will pick the status before credential was stored. And hence it won't show in "my credentials" screen.
High level description of changes done
- Removed connected component for MyCredentials screen so that we rely on only one way to render component. We are now using only hooks based data selection and not HOC
- Force storage to run after
CLAIM_REQUEST_SUCCESS
event changes the state - Reset events in claim-offer-store's reducer now checks for success states. Before resetting the state it will check if claim request is already in success state, if yes, then state won't reset. So even if by chance the credential offer screen shows up again, we won't reset previous success state.