LB-1729: Flairs settings shows incorrect time remaining #3153
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.
Problem
Flair section in settings page shows the invalid status of user's flair. It uses both LB API's endpoint (donors/all-flairs) and MB's endpoint(nag-check), MB's endpoint returns the user's donation data without setting the threshold (FLAIR_MONTHLY_DONATION_THRESHOLD = 5) and it overrides the flairUnlocked value.
Solution
By discarding the nag value returned by nag-checker and not setting flairUnlocked value to it, we can just use LB's endpoint to verify user's donation status and then use nag-checker's daysLeft value to show the time left.