Skip to content

fix: gate bounty claiming on linked payout wallet (#72) - #165

Open
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/72-gate-bounty-claim-on-wallet
Open

fix: gate bounty claiming on linked payout wallet (#72)#165
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/72-gate-bounty-claim-on-wallet

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 20, 2026

Copy link
Copy Markdown

Fixes #72.

  • Add a hard-block in handleClaim that checks user.stellarAddress before allowing the claim API call to proceed. If no payout wallet is linked, the action is blocked client-side with a clear error message explaining why (automatic payout release has no manual recovery path) and the user is redirected to /connect to link one.
  • This mirrors the existing if (!user) auth gate pattern already present in the same function, and parallels the withWallet guard used by handleFund — but correctly checks the durable backend-linked address (user.stellarAddress) rather than requiring a live Freighter session at claim time, since those are different requirements at different points in the flow.
  • The blocked state uses the existing error display channel, which is visually distinct from the pending (in-flight) state per the component's current UX contract.
  • Decision rationale (hard block vs. soft warning): Hard block chosen because the README documents fully-automatic payout release with no manual approval step, and BountyStatus has no state representing 'claimed but contributor has no payout wallet.' A soft warning would allow contributors to create an unrecoverable dead-end state where funds have nowhere to go after merge. Until a manual recovery flow or new status exists, preventing the action entirely is the safer default.
  • Team-split audit: Out of scope for this fix, but noted for follow-up — if team splits allow naming contributors who haven't linked wallets, the same dead-end risk applies at payout time. No such check exists today.
  • TypeScript compiles cleanly with npx tsc --noEmit.

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

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.

Gate bounty claiming on a linked payout wallet — IssueActions lets a user claim with stellarAddress: null

1 participant