Skip to content

fix: scope faucet claim state per token#178

Open
Chenxizhe2025 wants to merge 2 commits into
SO4-Markets:mainfrom
Chenxizhe2025:fix/faucet-token-claim-states
Open

fix: scope faucet claim state per token#178
Chenxizhe2025 wants to merge 2 commits into
SO4-Markets:mainfrom
Chenxizhe2025:fix/faucet-token-claim-states

Conversation

@Chenxizhe2025

Copy link
Copy Markdown

Summary

  • Track faucet claim lifecycle per token in a single useClaim hook: idle, pending, success, and error.
  • Keep single-card claims isolated so only the clicked card shows a spinner, disables, and receives success/error feedback.
  • Keep the bulk button state separate: it only shows a spinner for bulk claims, and it is disabled while any faucet token claim is already in flight to avoid duplicate submissions.
  • Preserve the existing toast flow, explorer link, cooldown message, and balance invalidation after success.

Closes #175

Validation

  • bun install --frozen-lockfile
  • bun run lint -- src/features/faucet/hooks/useClaim.tsx src/features/faucet/components/faucet-page.tsx
  • bun run build
  • bun run typecheck currently fails on pre-existing unrelated errors outside the faucet files: earn discover callback return type, unused mock write/imports, referral nullable arg, wallet AccountBadge null destructure, and shared bignum test assert globals.

@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Issue #2 — Faucet: give each token card its own claim state

1 participant