Skip to content

feat(citizen-sdk,bridging-sdk): non-blocking claim tx-submitted callback & bridging-sdk npm publish metadata (#62, #68) - #71

Closed
ocakciomursel-pixel wants to merge 1 commit into
GoodDollar:mainfrom
ocakciomursel-pixel:feat/claim-submitted-callback-and-bridging-publish-62-68
Closed

ocakciomursel-pixel wants to merge 1 commit into
GoodDollar:mainfrom
ocakciomursel-pixel:feat/claim-submitted-callback-and-bridging-publish-62-68

Conversation

@ocakciomursel-pixel

Copy link
Copy Markdown

Closes #62
Closes #68

Summary

1. @goodsdks/citizen-sdk: Non-blocking onClaimSubmitted callback (#62)

Addresses all maintainer review feedback from @sirpy and @blueogin on #63:

  • No redundant wrapper module or extra callback type aliases: invokes onHash?.(hash) directly inside ClaimSDK.submitAndWait and ClaimCustodialSDK.submitAndWait without introducing transactionCallbacks.ts or extra exported callback type aliases.
  • Two input parameters on claim(): claim(onConfirmFaucetTx?, onClaimSubmitted?) preserves backward compatibility for existing single-argument callers while forwarding onClaimSubmitted to submitAndWait.
  • Fire-and-forget callback execution with inline exception capture: wraps Promise.resolve(onHash?.(hash)).catch(...) in an inline try / catch so neither synchronous throws, rejected promises, nor slow/never-resolving consumer callbacks can block the 5s block wait or hang claim() after transaction broadcast.
  • Real submitAndWait unit test coverage: packages/citizen-sdk/test/claim-sdk.test.ts exercises the real ClaimSDK.submitAndWait implementation (without mocking it out) to verify callback-before-confirmation ordering, fire-and-forget behavior when onClaimSubmitted never resolves, and resilience against sync/async callback errors.

2. @goodsdks/bridging-sdk: NPM publication metadata (#68)

  • Adds "prepack": "yarn build", "files": ["dist"], "license": "MIT", "repository" (packages/bridging-sdk), and "publishConfig": { "access": "public" } to packages/bridging-sdk/package.json so @goodsdks/bridging-sdk matches the publication invariants of the other @goodsdks/* packages and unblocks downstream GoodWidget installs.

Verification

  • corepack yarn workspace @goodsdks/citizen-sdk test test/claim-sdk.test.ts (4 passed)
  • corepack yarn workspace @goodsdks/citizen-sdk build (ESM + CJS + DTS clean)
  • corepack yarn workspace @goodsdks/bridging-sdk build (ESM + CJS + DTS clean)

@L03TJ3 L03TJ3 closed this Oct 19, 2026

This branch is waiting to be deployed

1 waiting deployment
external — 26b0ca9d Waiting Oct 17, 2026 by ocakciomursel-pixel via authorize #275
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.

ClaimSDK: support optional transaction-submitted callback before confirmation bridging-sdk: package not published to npm (blocks GoodWidget#243)

2 participants