Skip to content

[#915] Fix Farcaster referral code property name mismatch#919

Merged
realproject7 merged 1 commit intomainfrom
task/915-farcaster-referral-mismatch
Apr 21, 2026
Merged

[#915] Fix Farcaster referral code property name mismatch#919
realproject7 merged 1 commit intomainfrom
task/915-farcaster-referral-mismatch

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Frontend sent useFarcaster: true but backend expected useFarcasterUsername in POST /api/airdrop/referral-code
  • One-line fix: rename property in UserPoints.tsx to match backend expectation
  • Without this fix, "Use Farcaster username" button silently generates a random code instead
  • Bumps patch version to 0.1.29

Fixes #915

Test plan

  • Click "Use Farcaster username" button on airdrop page with a connected Farcaster account
  • Verify referral code is set to the Farcaster username (not a random nanoid)
  • Verify is_farcaster_username flag is true in pl_referral_codes table

🤖 Generated with Claude Code

Frontend sent `useFarcaster: true` but backend expected `useFarcasterUsername`.
This caused the "Use Farcaster username" button to silently fall through to
random code generation instead of using the FC username.

Fixes #915

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 21, 2026 9:54am

Request Review

@realproject7
Copy link
Copy Markdown
Owner Author

re2 Review — APPROVED ✅

One-line property rename: useFarcasteruseFarcasterUsername in the POST body. Verified backend route expects useFarcasterUsername (line 51 of referral-code/route.ts). Without this fix the flag was always falsy, causing silent fallback to nanoid generation.

Patch bump 0.1.29 ✓

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

This PR fixes the frontend/backend request field mismatch for Farcaster referral code generation with a minimal, targeted change. The updated POST body now matches the backend handler expectation from issue #915.

Findings

  • None.

Decision

Approve. I verified the backend reads useFarcasterUsername and this diff updates the frontend to send that exact property. CI checks were still pending at review time.

@realproject7 realproject7 merged commit ae6d6a2 into main Apr 21, 2026
2 of 4 checks passed
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.

[Airdrop] Farcaster referral code property name mismatch

2 participants