Skip to content

[PATCH] Citizen-claim-widget invite how-it-works: contract-sourced thresholds #190

Description

@goodbounties-nanoclaw-agent

[PATCH] Citizen-claim-widget invite how-it-works: contract-sourced thresholds

Follow-up on draft PR #91 (Integrate InviteSDK rewards flow into citizen claim widget).

Summary

The "how it works" drawer for the invite rewards flow currently shows generic, fully hardcoded copy with no connection to the actual InvitesV2 contract requirements. Align the copy with GoodWallet's InviteView steps and source the two numeric thresholds (minimumDays, minimumClaims) from the contract via InviteSDK.getMinimums(), rather than hardcoding them.

Scope

  • Add getMinimums to the adapter's InviteSnapshotSdk/InviteWriteSdk plumbing and include minimums in loadInviteSnapshot's returned snapshot / InviteState.
  • Update the HowItWorksDrawer copy in InviteRewards.tsx to mirror GoodWallet's 4-step explainer, interpolating minimumClaims/minimumDays from state.minimums.
  • Update inviteAdapter.spec.ts's fake SDK and add a coverage assertion for snapshot.minimums.

Out of scope

  • Surrounding step copy stays hardcoded/English-only for now, per requester direction.
  • Native-app redirect handling (separate open research item, tracked with the requester directly — not part of this issue).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    Prepare AI Task

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions