Integrate InviteSDK rewards flow into citizen claim widget#91
Conversation
Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
|
Please update the direct dependency to Then wire only these two SDK capabilities. No broader Invite Rewards redesign, copy pass, or documentation work is needed in this follow-up.
The contract and InviteSDK 1.0.3 support this valid flow: await sdk.join(myCode, zeroHash) // personal code was registered earlier
await sdk.join(myCode, inviterCode) // attach one valid inviter laterUpdate the widget so a user who already has user.inviteCode !== zeroHash &&
user.invitedBy === zeroAddress &&
!user.bountyPaidUse the existing Important protocol boundary: an ordinary UBI claim does not prevent this. A paid invite bounty or an already attached inviter does; show the normal SDK error in those cases.
Use the new SDK helper in 1.0.3: const collectableInvitees = await sdk.getCollectableInvitees(address)Keep This replaces the current Please add focused tests for:
|
Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
Adds
@goodsdks/invite-sdk@1.0.1to the citizen claim widget and replaces the Invite Rewards placeholder with a provider-first, viem-backed invite lifecycle. Claim and Invite Rewards now share invite validation, joining, and refresh state without changing claim behavior.Shared invite runtime
Invite code and joining
InviteSDK.resolveCode.Rewards experience