Skip to content

Show per-member claim eligibility using has_claimed (#312) - #369

Open
ositaemmanuel653-netizen wants to merge 1 commit into
crackedstudio:mainfrom
ositaemmanuel653-netizen:feature/312-has-claimed-per-member
Open

Show per-member claim eligibility using has_claimed (#312)#369
ositaemmanuel653-netizen wants to merge 1 commit into
crackedstudio:mainfrom
ositaemmanuel653-netizen:feature/312-has-claimed-per-member

Conversation

@ositaemmanuel653-netizen

Copy link
Copy Markdown

Closes #312

What changed

  • Call has_claimed as a read-only contract simulation instead of submitting a transaction.
  • Pre-check each member's nullifier when entering the claim step for the current round.
  • Mark members who have already claimed as ineligible before proof generation begins.
  • Disable selection of ineligible members and provide an accessible explanation.
  • Add an ineligible flag to the Member type.
  • Update MemberRing and ClaimSection to reflect per-member claim eligibility.

Why

Closes #312

The app previously allowed users to select a member who had already claimed, only discovering the issue after generating a proof and attempting the claim. Since proof generation is the slowest part of the flow, checking eligibility before proving provides immediate feedback and avoids unnecessary proof generation and failed transactions.

The has_claimed contract method is now used as a read-only simulation so eligibility checks do not submit transactions or incur transaction costs.

Testing

  • Circuit tests (cd circuits && npm test)
  • Contract tests (cd contracts && cargo test)
  • E2E against testnet (npm run e2e)
  • App tested manually (cd app && npm run dev)
  • Docs-only (no code changed)

Screenshots

Before

After

- Call has_claimed as read-only
- Pre-check per-member nullifier on entering claim step
- Mark ineligible members and disable selection
- Add ineligible flag to Member type
- Update MemberRing/ClaimSection UI
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.

Show per-member claim eligibility using has_claimed

1 participant