Fix/proof polling resumption - #142
Open
Opulencechuks wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #125
Description
Proof verification is the critical path to reward delivery. Previously, if a user submitted a proof and the app was killed or backgrounded before the backend responded, the
proofIdwas lost upon rehydration. The activity would stay 'pending' forever in the local store, leaving the user unrewarded without any retry mechanism.This PR adds a
PendingProofsPollManagercomponent that automatically scans the globalactivityStoreon mount for activities that are pending and carry aproofId. It is mounted insideRootNavigatorto ensure it resumes polling as soon as the app starts, successfully transitioning pending activities to confirmed or failed states and delivering rewards without duplicating polls.Closes #
Type of Change
How Has This Been Tested?
Checklist
Screenshots
nil
Additional Context
useProofStatusbackoff timers.proofId(such as offline queued submissions) wait safely in the queue until they are synced, without triggering polling errors.