Conversation
Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
|
@copilot Please read below review thoroughly and follow up on each point. pull-request 299 is referring to this: GoodDollar/GoodProtocol#299 Follow-up: GovernanceWidget first-pass fix (v2)Update GoodWidget PR #77 so its runtime is contract-correct, maintainable, and free of production mock data. Work only in the governance-widget package, its stories, and its tests. Keep the existing visual design unless a real loading, empty, error, or transaction state requires different copy. 1. Make the package build and establish clean boundaries
Checkpoint: the package builds declarations and ABI/mapping tests pass. 2. Fix membership and onboarding
Checkpoint: an eligible HoA wallet and a Citizen wallet can complete their correct mocked-RPC onboarding paths, and failed receipts never show success. 3. Replace mock voting with contract-derived statesRead:
Then implement:
Checkpoint: every voting state is derived from mocked contract responses, and submitted recipients are valid addresses. 4. Add live “funding received so far”
Use this exact query: query FundingStreams($receiver: String!, $token: String!, $first: Int!, $skip: Int!) {
streams(
first: $first
skip: $skip
where: { receiver: $receiver, token: $token }
) {
sender { id }
currentFlowRate
streamedUntilUpdatedAt
updatedAtTimestamp
}
}
Checkpoint: subgraph fixtures cover active, stopped, multiple, empty, paginated, and failed stream queries. 5. Finish QA and evidence
Run: pnpm install
pnpm build
pnpm lint
pnpm test:demo tests/widgets/governance-widgetDocument unrelated root lint failures instead of changing unrelated packages. Done when
|
Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>
Addressed in 55ba33a. Updated the governance-widget runtime to use the final GoodDaoHouses ABI/mappers, split contract/transaction/voting/funding concerns, use HoA eligibility separately from GoodID, wait for transferAndCall receipts for registration/restake, derive voting/funding from contract/subgraph data, and added focused mapper/transaction/funding tests plus refreshed affected screenshots. Validation: |
Implements the reviewed GovernanceWidget plan by adding a contract-correct app-level runtime boundary for GoodDaoHouses membership, onboarding, dashboard, Alignment voting states, and live funding totals. The widget remains mockable for Storybook/Playwright while keeping contract and SDK logic out of presentational cards.
Runtime adapter + SDK layer
useGovernanceAdapterwith mockable adapter-factory contract.App-level GovernanceWidget
Governance flows
bigintvalues and derives labels only for display.getHoaEligibility(account)while keeping GoodID verification as a separate onboarding requirement with an actionable verification button.transferAndCall, waits for receipts, and reflects wallet-confirmation, submitted, confirmed, rejected, and reverted states.isVotingPeriod,getCurrentVoteId,getVoteConfig,getVoteRecipients, active HoA members,getHasVoted, and finalized units.Funding received so far
flowSplitterConfig.poolAddressas the Superfluid receiver.QA coverage