Skip to content

Integrate InviteSDK rewards flow into citizen claim widget#91

Draft
L03TJ3 with Copilot wants to merge 2 commits into
mainfrom
copilot/integrate-invite-sdk-into-widget
Draft

Integrate InviteSDK rewards flow into citizen claim widget#91
L03TJ3 with Copilot wants to merge 2 commits into
mainfrom
copilot/integrate-invite-sdk-into-widget

Conversation

Copilot AI commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Adds @goodsdks/invite-sdk@1.0.1 to 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

    • Initializes InviteSDK only for Celo/XDC and delegates reads, simulations, writes, error mapping, and collection to the SDK.
    • Loads invite user, level, invitees, pending invitees, and eligibility diagnostics.
    • Supports retryable loading, unsupported-network, disconnected, join, collection, and mutation-error states.
  • Invite code and joining

    • Implements GoodWallet’s Base58 shortest-unused-prefix algorithm using InviteSDK.resolveCode.
    • Validates unknown, self, and already-joined invite codes before joining.
    • Exposes the same pending-safe join action from both Claim and Invite Rewards.
  • Rewards experience

    • Adds reward education, verified-code creation, current-page sharing, pending/approved invitee status, diagnostics, and batch collection.
    • Shares the exact current page URL without host callback, route, or destination configuration.
const message =
  `Claim GoodDollar with me. Open this page and use my invite code: ${code}\n` +
  window.location.href
  • Coverage and documentation
    • Adds Invite Rewards tab smoke coverage and updated screenshot evidence.
    • Documents supported networks, environment behavior, sharing contract, code generation, and collection lifecycle.

Copilot AI linked an issue Jul 16, 2026 that may be closed by this pull request
12 tasks
Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
Copilot AI changed the title [WIP] Integrate invite SDK into citizen-claim-widget Integrate InviteSDK rewards flow into citizen claim widget Jul 16, 2026
Copilot AI requested a review from L03TJ3 July 16, 2026 05:08
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.

[PLAN] Integrate invite SDK into citizen-claim-widget

2 participants