Skip to content

fix: prevent self-vouching in reputation screen #40

Description

@EmeditWeb

Problem

In app/(tabs)/reputation.tsx (lines 119-124), the handleVouch() function submits a vouch with mentorWallet: walletAddress AND learnerWallet: walletAddress — i.e., the user is vouching for THEMSELVES. This is a logical bug.

User impact: Users can vouch for themselves, artificially inflating their own reputation. This breaks the reputation system's integrity.

Root Cause

The vouch implementation uses the current wallet address for both mentor and learner fields.

What To Build

  1. Add a recipient wallet address input field for the vouch
  2. Validate that mentor wallet ≠ learner wallet
  3. Show error if user tries to vouch for themselves
  4. Update the handleVouch() to use the correct recipient address

Files To Touch

  • app/(tabs)/reputation.tsx — lines 119-124 fix self-vouch bug

Acceptance Criteria

  • Vouch requires separate mentor and learner addresses
  • Self-vouching is rejected with error message
  • Vouch endpoint called with correct recipient address
  • Build passes

Mandatory Checks

  • context/ files read
  • PR references this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions