Skip to content

feat(bounty): cancel / refund flow in settings tab (#634)#674

Merged
Benjtalkshow merged 1 commit into
boundlessfi:feat/t-replacefrom
Benjtalkshow:feat/bounty-cancel-refund
Jul 5, 2026
Merged

feat(bounty): cancel / refund flow in settings tab (#634)#674
Benjtalkshow merged 1 commit into
boundlessfi:feat/t-replacefrom
Benjtalkshow:feat/bounty-cancel-refund

Conversation

@Benjtalkshow

Copy link
Copy Markdown
Collaborator

What

Implements the FE cancel / refund flow (#634) for the bounty operate dashboard's Settings tab. If a bounty gets no acceptable submissions (or the organizer aborts), they cancel it and the escrow refunds contributors first, then the owner residual.

Changes

  • hooks/use-bounty-cancel.ts (new) — drives the single cancel escrow op through useEscrowOpRunner (organizer scope), mirroring useBountyPayout. MANAGED signs server-side; EXTERNAL signs the returned unsigned XDR via the wallet kit. On settle it toasts and invalidates the overview query so the dashboard reflects CANCELLED immediately.
  • components/organization/bounties/manage/BountySettingsPanel.tsx (new) — the Settings tab. A danger-zone card explains the refund order and gates the action behind a confirm dialog that requires typing CANCEL. Shows live phase progress while running, and a success card with the refund transaction explorer link on settle. The action is hidden for drafts (no funded escrow) and terminal (completed/cancelled) bounties.
  • BountyManagementDashboard.tsx — wired BountySettingsPanel into the Settings tab; removed the now-unused placeholder helper and import.

Acceptance criteria

  • Cancel action in management settings with an explicit confirmation explaining the refund (contributor-first, then owner).
  • Builds the cancel escrow op, drives useEscrowOpRunner -> progress -> CANCELLED.
  • Reflects CANCELLED state + refund tx.

Notes

  • Mirrors the existing bounty POST .../escrow/cancel endpoint; the organizer escrow client cancel already existed.
  • Verified with tsc --noEmit (0 errors).

Add the Settings tab cancel action for the operate dashboard: a confirm
gate explaining the refund order (contributors first, then owner
residual), driving the cancel escrow op through useEscrowOpRunner to
CANCELLED and surfacing the refund transaction on settle.
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 954bdd2a-5a4d-48a1-85d0-f40f896a85a6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Benjtalkshow Benjtalkshow merged commit 68be515 into boundlessfi:feat/t-replace Jul 5, 2026
2 of 3 checks passed
@Benjtalkshow Benjtalkshow mentioned this pull request Jul 5, 2026
3 tasks
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.

1 participant