Skip to content

[Airdrop] Farcaster referral code property name mismatch #915

@realproject7

Description

@realproject7

Parent: #877

Problem

Frontend sends useFarcaster: true but backend expects useFarcasterUsername: true when setting Farcaster username as referral code.

Frontend (src/components/airdrop/UserPoints.tsx):

body: JSON.stringify({ message, signature, useFarcaster: true })

Backend (src/app/api/airdrop/referral-code/route.ts):

useFarcasterUsername = body.useFarcasterUsername === true

Impact

The "Use Farcaster username" button silently fails — the request goes through but the backend never sees the flag, so it generates a nanoid instead of using the Farcaster username.

Fix

Change frontend to send useFarcasterUsername: true (matching the backend), or change backend to read useFarcaster (matching the frontend). Frontend fix is simpler.

Acceptance Criteria

  • Property name matches between frontend and backend
  • "Use Farcaster username" button correctly sets username as referral code

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentairdropPLOT 10x Airdrop CampaignbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions