Feature: Bounty Cancellation and Refund Flow
Overview
The Bounty Registry contract supports cancel_bounty() which returns funds to the escrow pool for refunding. The Core Escrow contract has refund_all() and refund_remaining() methods. The frontend has no cancellation UI.
Depends on: #139 (TypeScript contract bindings)
Goals
- Allow bounty creators to cancel bounties before completion
- Trigger on-chain escrow refund
- Show cancellation status and refund confirmation
- Handle edge cases (in-progress work, partial payments)
Contract Methods
BountyRegistry.cancel_bounty(creator, bounty_id)
CoreEscrow.refund_all(pool_id)
CoreEscrow.refund_remaining(pool_id)
Implementation Details
1. Cancel Button
Modify: app/bounty/[bountyId]/page.tsx
- "Cancel Bounty" button for creator (only when status allows)
- Confirmation dialog with warning about implications
- Reason input (logged on-chain)
2. Refund Status Tracker
Create: components/bounty/refund-status.tsx
- Shows refund progress after cancellation
- Transaction hash and Stellar explorer link
- Amount refunded
Acceptance Criteria
Feature: Bounty Cancellation and Refund Flow
Overview
The Bounty Registry contract supports
cancel_bounty()which returns funds to the escrow pool for refunding. The Core Escrow contract hasrefund_all()andrefund_remaining()methods. The frontend has no cancellation UI.Depends on: #139 (TypeScript contract bindings)
Goals
Contract Methods
Implementation Details
1. Cancel Button
Modify:
app/bounty/[bountyId]/page.tsx2. Refund Status Tracker
Create:
components/bounty/refund-status.tsxAcceptance Criteria