Skip to content

fix: send real decline request in Vouch page #66

Closed

Description

@EmeditWeb

Problem

In Vouch.tsx (lines 179-183), the handleDecline function uses setTimeout(() => r(), 600) to simulate declining a vouch request. No API call is made. The request visually disappears from the UI after 600ms but reappears on page refresh because the decline was never persisted.

User impact: Mentors believe they have declined vouch requests, but the requests keep reappearing. This creates confusion and undermines trust in the platform.

Root Cause

The decline action was stubbed during initial development. The API endpoint POST /vouching/decline or equivalent exists (vouching.controller.ts) but was never wired to the frontend.

What To Build

  1. Add declineVouch(requestId) method to vouching.service.ts
  2. Replace the setTimeout + fake decline in Vouch.tsx with real API call
  3. Add loading spinner on the decline button while request is in flight
  4. Add error toast if decline fails
  5. Remove the declined request from local state on success

Files To Touch

  • src/pages/Vouch.tsx — lines 179-183 replace fake decline
  • src/services/vouching.service.ts — add declineVouch method

Acceptance Criteria

  • Decline sends API request to backend
  • Loading state on decline button during API call
  • Error toast shown if decline fails
  • Declined request removed from UI on success
  • Declined requests stay gone after page refresh
  • No setTimeout used for simulating API calls anywhere

Mandatory Checks

  • context/ files read
  • npm run build passes
  • npm test passes
  • PR references this issue

Activity

  1. changed the title [-]fix: Vouch.tsx decline action uses setTimeout instead of real API call[/-] [+]fix: Vouch.tsx handleDecline at lines 179-183 uses setTimeout(() => resolve(), 600) to simulate API call instead of sending real POST /vouching/decline — declined requests reappear on page refresh[/+] on Jul 2, 2026
  2. changed the title [-]fix: Vouch.tsx handleDecline at lines 179-183 uses setTimeout(() => resolve(), 600) to simulate API call instead of sending real POST /vouching/decline — declined requests reappear on page refresh[/-] [+]fix: send real decline request in Vouch page[/+] on Jul 2, 2026
  3. prissca commented on Jul 22, 2026

    @prissca
    Contributor

    i will love to work on this issue

  4. grantfox-oss commented on Jul 22, 2026

    @grantfox-oss

    🦊 GrantFox — @prissca has been assigned to this issue as part of the Official Campaign | FWC26 campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #66)
    2. Your PR will be reviewed by the StepFi-app maintainers

    Good luck! Track your progress on GrantFox.

  5. grantfox-oss commented on Sep 29, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @prissca's PR #93 was approved and merged by @EmeditWeb.

    🏆 @prissca: You earned 40 FoxPoints for this contribution! Your current tier: Builder (2,142 total points). Track your full progress on GrantFox.

    👏 Great work, @prissca! Keep contributing to StepFi-app.

  6. added a commit that references this issue on Sep 29, 2026
    5009ed6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions