Skip to content

fix(bounty): include release_failed and unknown in TERMINAL_STATUSES (Fixes #924) - #957

Open
Lion4467cat wants to merge 1 commit into
MergeFi:mainfrom
Lion4467cat:fix/issue-924-terminal-statuses
Open

Lion4467cat wants to merge 1 commit into
MergeFi:mainfrom
Lion4467cat:fix/issue-924-terminal-statuses

Conversation

@Lion4467cat

@Lion4467cat Lion4467cat commented Nov 14, 2026 •

Copy link
Copy Markdown

Fixes #924

What changed

  • Added 'release_failed' and 'unknown' to TERMINAL_STATUSES in src/types/bounty.ts.
  • Cached PollerEntry.snapshot in src/hooks/bountyPoller.ts and wired useBountyStatus.ts so useSyncExternalStore receives referentially stable snapshots and stops polling once any terminal status is reached.
  • Added unit tests in src/hooks/useBountyStatus.test.tsx asserting that release_failed and unknown stop polling and report isPolling: false and isLive: false.

Why

  • TERMINAL_STATUSES previously omitted release_failed and unknown, causing bountyPoller to poll permanently failed or unrecognized bounties every 5 seconds indefinitely and useBountyStatus to report them as live forever.

How to test

  • npx jest src/hooks/useBountyStatus.test.tsx --no-coverage (6 passed, 6 total)
  • npx eslint src/types/bounty.ts src/hooks/bountyPoller.ts src/hooks/useBountyStatus.ts src/hooks/useBountyStatus.test.tsx (0 errors, 0 warnings)

@vercel

vercel Bot commented Nov 14, 2026

Copy link
Copy Markdown

@Lion4467cat is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@Lion4467cat
Lion4467cat force-pushed the fix/issue-924-terminal-statuses branch from c6f2c14 to 74a232f Compare November 14, 2026 10:41

This branch has not been deployed

No deployments
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.

TERMINAL_STATUSES omits release_failed, so the poller keeps polling a bounty whose payout has permanently failed

1 participant