Skip to content

Fix/proof polling resumption - #142

Open
Opulencechuks wants to merge 4 commits into
ecotask-network:mainfrom
Opulencechuks:fix/proof-polling-resumption
Open

Fix/proof polling resumption#142
Opulencechuks wants to merge 4 commits into
ecotask-network:mainfrom
Opulencechuks:fix/proof-polling-resumption

Conversation

@Opulencechuks

Copy link
Copy Markdown

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 proofId was 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 PendingProofsPollManager component that automatically scans the global activityStore on mount for activities that are pending and carry a proofId. It is mounted inside RootNavigator to 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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that breaks existing functionality)
  • Documentation update
  • Chore (deps, tooling, refactoring)

How Has This Been Tested?

  • Unit tests added / updated
  • Integration tests added / updated
  • Manual testing on Android
  • Manual testing on iOS

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented on complex or non-obvious code
  • I have updated the documentation where needed
  • My changes generate no new warnings or lint errors
  • All existing and new tests pass

Screenshots

nil

Additional Context

  • Polling restarts are idempotent and respect the existing useProofStatus backoff timers.
  • Activities missing a proofId (such as offline queued submissions) wait safely in the queue until they are synced, without triggering polling errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] useProofStatus polling state is ephemeral — proofId is lost on app restart, leaving activities permanently stuck in 'pending'

1 participant