Citizen-claim-widget: contract-sourced how-it-works copy (invite rewards) - #191
Draft
goodbounties-nanoclaw-agent[bot] wants to merge 3 commits into
Conversation
…inimums Add getMinimums to the adapter's SDK plumbing and surface minimums on InviteState so consumers can source contract thresholds instead of hardcoding them. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
…thresholds Mirror GoodWallet's InviteView 4-step explainer in the how-it-works drawer, interpolating minimumClaims/minimumDays from state.minimums instead of showing generic hardcoded copy. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
Extend the fake SDK double with getMinimums and assert the loaded snapshot carries the contract thresholds. Co-Authored-By: Claude <noreply@anthropic.com> On-Behalf-Of: gdpatchagent[onecli] (yaskkeryodtdijpv)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #190. Stacked on draft PR #91 (Integrate InviteSDK rewards flow into citizen claim widget).
What
The invite rewards "how it works" drawer showed generic, fully hardcoded copy. This aligns it with GoodWallet's InviteView step copy, sourcing
minimumDays/minimumClaimsfrom the InvitesV2 contract viaInviteSDK.getMinimums()instead of hardcoding them. Surrounding step copy stays hardcoded/English-only for now, per requester direction.Changes
inviteAdapter.ts: addgetMinimumsto the SDK plumbing (InviteSnapshotSdk/InviteWriteSdk), includeminimumsin the loaded snapshot /InviteState.InviteRewards.tsx:HowItWorksDrawernow mirrors GoodWallet's 4-step explainer and interpolatesstate.minimums.minimumClaims/minimumDays.inviteAdapter.spec.ts: fake SDK now implementsgetMinimums; added assertion coveringsnapshot.minimums.Verification
pnpm turbo run build --filter=@goodwidget/citizen-claim-widget— passpnpm turbo run lint --filter=@goodwidget/citizen-claim-widget— passpnpm test:demo(Playwright) ontests/widgets/citizen-claim-widget/inviteAdapter.spec.ts— pre-existing failure reproduced identically on the unmodified base branch, unrelated to this change: the Node-based Playwright collector can't parse the React Native-flavored syntax in@tamagui/lucide-icons/react-native-svg, whichpackages/uire-exports transitively. Flagging as a separate repo test-infra gap, out of scope here.Out of scope