Draft
fix(citizen-claim-widget): keep claim toast visible through on-chain confirmation#171
Conversation
3 tasks
1. Restore push-path triggers for ai-credits-web and superfluid-campaign-web workflows (the pull_request_target section remains narrowed as-is). 2. Remove the wrapProviderWithSubmissionSignal provider proxy from adapter.ts. 3. Thread onTransactionSubmitted directly into sdk.claimSDK.claim() as the second argument (ClaimSDK.submitAndWait already accepts an onHash callback; a companion PR to GoodDollar/GoodSDKs will expose it from claim()). Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix citizen claim widget to keep claim toast visible through on-chain confirmation
fix(citizen-claim-widget): keep claim toast visible through on-chain confirmation
Aug 17, 2026
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.
Summary
onTransactionSubmittedparameter threaded throughClaimSDK.claim()→submitAndWait()'s existingonHashcallback. A companion PR toGoodDollar/GoodSDKsexposes this fromclaim(); a temporaryas anycast bridges the gap until that SDK release lands.Changes
adapter.ts: removed thewrapProviderWithSubmissionSignalEIP-1193 provider proxy.onTransactionSubmittedis now passed directly as the second argument tosdk.claimSDK.claim(), delegating toClaimSDK.submitAndWait's built-inonHashcallback instead of intercepting at the provider level.CitizenClaimWidget.tsx: on that signal, updates each chain's toast to"Claiming on <chain> — waiting for blockchain confirmation"with aconfirmingstatus, staying persistent (duration: 0) until the claim promise settles.Toast.tsx: adds aconfirmingToastStatuswith a subtly deeper blue border ($primaryDarkvs$primaryfor signing) so it reads as related-but-distinct from the initial signing toast, and stays clearly different from the greensuccessstate..github/workflows/deploy-ai-credits-web.yml/deploy-superfluid-campaign-web.yml: restored the broaderpush: mainpath triggers (packages/core/**,packages/ui/**,packages/embed/**,pnpm-lock.yaml,pnpm-workspace.yaml); thepull_request_targetsections remain narrowed to app/widget-specific paths.Scope note
Only the default non-custodial (wallet-provider-driven) claim path is covered — the one in the bug report. Custodial execution mode (
claimExecution.clientsByChain) supplies pre-built clients from outside GoodWidget; flagging as a possible separate follow-up if that path is ever in scope.Test plan
pnpm --filter @goodwidget/ui --filter @goodwidget/citizen-claim-widget --filter @goodwidget/superfluid-campaign-widget --filter @goodwidget/embed build— cleanpnpm --filter @goodwidget/ui --filter @goodwidget/citizen-claim-widget --filter @goodwidget/superfluid-campaign-widget --filter @goodwidget/embed lint— clean (only pre-existing warnings unrelated to this change)GoodSDKsPR to be merged and the SDK version bumped)🤖 Generated with Claude Code