Skip to content

fix: gate refund button on funder identity and add funderAddress field (#82) - #171

Open
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/82-refund-funder-identity
Open

fix: gate refund button on funder identity and add funderAddress field (#82)#171
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/82-refund-funder-identity

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 20, 2026

Copy link
Copy Markdown

Fixes #82.

  • Add funderAddress field to Bounty type and map it through adaptBounty from the backend's RawBounty shape, making sponsor identity available to the frontend for authorization checks.
  • Gate the "Refund sponsor" button rendering on user?.stellarAddress === bounty.funderAddress, so only the actual funder sees the action — preventing unrelated authenticated visitors from being shown a button they cannot legitimately use.
  • Document that handleFund is intentionally unconditional (any sponsor can fund an open bounty per the crowdfunding model), distinguishing it from the restricted refund action via an explicit code comment.
  • Backend authorization note: This fix addresses the frontend UX/trust gap regardless of backend behavior. If the backend already 403s non-funder refund attempts, this makes the UI consistent with that enforcement. If not, this prevents the frontend from ever sending an unauthorized request in the first place.
  • 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.

IssueActions renders an unconditional Refund sponsor action to any authenticated visitor; Bounty has no funder identity to gate it

1 participant