Skip to content

handleRefund triggers an irreversible on-chain refund immediately on click, with no confirmation step #264

Closed

Description

@chonilius

src/app/issues/[id]/IssueActions.tsx#handleRefund fires immediately on click, with no
intermediate confirmation:

<Button size="lg" variant="outline" onClick={handleRefund} disabled={pending}>
  Refund sponsor
</Button>
async function handleRefund() {
  setError(null);
  setNotice(null);
  setPending(true);
  try {
    await apiPost(`/bounties/${bounty.id}/refund`);
    ...

A single, un-confirmed click on "Refund sponsor" immediately posts the refund request —
no "Are you sure?" dialog, no summary of what's about to happen (how much, to whom), and
no undo. This button is shown for both "funded" bounties (nobody's working on it yet —
lower stakes) and "claimed" bounties (a contributor may already be actively working a
pull request against it), with identical zero-friction behavior in both cases. Every
other consequential, less-reversible action pattern in typical fintech UIs gates behind
at least a lightweight confirmation for exactly this reason: a stray click, a
double-tap on mobile, or a misclick meant for an adjacent element triggers real,
on-chain fund movement with no recovery path.

Suggested fix: add a confirmation step (a native window.confirm-style prompt at
minimum, ideally a proper modal summarizing the amount/recipient) before calling
handleRefund, particularly for the claimed case where a contributor's in-progress
work is affected.

Activity

  1. added
    bug
    enhancement
    very hard
    help wanted
    on Aug 21, 2026
  2. added
    Stellar Wave
    on Aug 25, 2026
  3. Uchechukwu-Ekezie commented on Aug 25, 2026

    @Uchechukwu-Ekezie
    Contributor

    @Uchechukwu-Ekezie has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    Hello maintainer, i would like to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Uchechukwu-Ekezie to this issue.

  4. darlyntonmusa1-alt commented on Aug 25, 2026

    @darlyntonmusa1-alt

    @darlyntonmusa1-alt has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    Hello, this issue aligns well with my skill set and I’m confident I can resolve it properly. Please assign it to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @darlyntonmusa1-alt to this issue.

  5. drips-wave commented on Aug 25, 2026

    @drips-wave

    Congratulations, @Uchechukwu-Ekezie! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

    🧑‍💻 @Uchechukwu-Ekezie: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. drips-wave commented on Aug 25, 2026

    @drips-wave

    This issue has been completed by @Uchechukwu-Ekezie as part of the Stellar Wave Program's 8th Wave 🥳

    😎 @Uchechukwu-Ekezie: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

  7. removed
    Stellar Wave
    on Oct 15, 2026
  8. added
    Stellar Wave
    on Oct 15, 2026
  9. removed
    Stellar Wave
    on Oct 15, 2026
  10. added
    Stellar Wave
    on Oct 15, 2026
  11. removed
    Stellar Wave
    on Oct 15, 2026
  12. added
    Stellar Wave
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar Wavebugenhancementhelp wantedvery hard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions