Epic: #1229 · Spec: §6.2 · Type: CODE · Estimate: 0.5 day · Depends on: T2.1
Scope
Critical correctness fix: v5 finalize SQL assumes pl_points.action='buy'.points = raw PLOT spent. If streak boost stays in cron writes, distribution is wrong.
(a) lib/airdrop/points.ts
- Strip streak boost from
computeBuyPoints(plotSpent, _streak). Return raw plotSpent only. _streak param can stay (no-op) for API compat.
- DELETE
computeReferralPoints — v5 handles referrals via multiplier at finalize time.
(b) lib/airdrop/award.ts
awardWritePoints → no-op (return early, no DB write).
awardRatePoints → no-op.
- Keep function signatures for caller compatibility.
(c) src/app/api/cron/airdrop-points/route.ts
- Remove the
if (referrer) { inserts.push({ action: "referral", ... }) } block.
- Remove streak fetch (no longer needed since
computeBuyPoints ignores streak).
(d) src/app/api/airdrop/checkin/route.ts
- Replace handler body with
return new Response(null, { status: 410 }) (410 Gone).
- OR delete the route file entirely (cleaner). Decide at PR time.
Acceptance
Dependencies
T2.1 (config provides empty STREAK_BOOSTS)
Epic: #1229 · Spec: §6.2 · Type: CODE · Estimate: 0.5 day · Depends on: T2.1
Scope
Critical correctness fix: v5 finalize SQL assumes
pl_points.action='buy'.points= raw PLOT spent. If streak boost stays in cron writes, distribution is wrong.(a)
lib/airdrop/points.tscomputeBuyPoints(plotSpent, _streak). Return rawplotSpentonly._streakparam can stay (no-op) for API compat.computeReferralPoints— v5 handles referrals via multiplier at finalize time.(b)
lib/airdrop/award.tsawardWritePoints→ no-op (return early, no DB write).awardRatePoints→ no-op.(c)
src/app/api/cron/airdrop-points/route.tsif (referrer) { inserts.push({ action: "referral", ... }) }block.computeBuyPointsignores streak).(d)
src/app/api/airdrop/checkin/route.tsreturn new Response(null, { status: 410 })(410 Gone).Acceptance
computeBuyPoints(100, 5) === 100(no streak multiplication)computeReferralPointsdeletedawardWritePoints+awardRatePointsreturn early, no DB writesaction='buy'rows (noaction='referral'from same code path)/api/airdrop/checkinreturns 410 OR route deletedDependencies
T2.1 (config provides empty
STREAK_BOOSTS)