Fix logic keeping users on expired route even after time has been added #7796
+1
−4
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.
When a user creates an account in the app and
then adds time to the account outside of the app
the user should then be shown the
"/main/time-added"
route.Whenever an account is created in the app, it's
expiredStatus
is set immediately to"expired"
,which makes the app show the
"/main/expired"
route. When time is added to the account its
expiredStatus
changes to"time_added"
and thisshould show the
"/main/time-added"
route.However, due to an overly broad condition
in the logic to determine when the
"/main/expired"
route should be shown, thiscaused the
"main/time-added"
route to never beshown, as the overly broad condition effectively
prevented the logic to determine when to show the
"/main/time-added"
route from ever being called.This overly broad condition erroneously targeted
all new accounts created from within the app and
prevented the transition to the
"/main/time-added"
route.
To fix the problem we update the logic regarding
when to show the
"/main/expired"
route to notcheck if the account is new, as it is enough to
only check if the account is logged in and that
its
expiredStatus
is"expired"
.This change allows the logic to determine when
the
"/main/time-added"
route should be shown tobe called and as such can allow the route to be
shown after time has been added.
This change is