Repository navigation
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
Conversation
…ack & bridging-sdk npm publish metadata (GoodDollar#62, GoodDollar#68)
This branch is waiting to be deployed
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 #62
Closes #68
Summary
1.
@goodsdks/citizen-sdk: Non-blockingonClaimSubmittedcallback (#62)Addresses all maintainer review feedback from @sirpy and @blueogin on
#63:onHash?.(hash)directly insideClaimSDK.submitAndWaitandClaimCustodialSDK.submitAndWaitwithout introducingtransactionCallbacks.tsor extra exported callback type aliases.claim():claim(onConfirmFaucetTx?, onClaimSubmitted?)preserves backward compatibility for existing single-argument callers while forwardingonClaimSubmittedtosubmitAndWait.Promise.resolve(onHash?.(hash)).catch(...)in an inlinetry / catchso neither synchronous throws, rejected promises, nor slow/never-resolving consumer callbacks can block the 5s block wait or hangclaim()after transaction broadcast.submitAndWaitunit test coverage:packages/citizen-sdk/test/claim-sdk.test.tsexercises the realClaimSDK.submitAndWaitimplementation (without mocking it out) to verify callback-before-confirmation ordering, fire-and-forget behavior whenonClaimSubmittednever resolves, and resilience against sync/async callback errors.2.
@goodsdks/bridging-sdk: NPM publication metadata (#68)"prepack": "yarn build","files": ["dist"],"license": "MIT","repository"(packages/bridging-sdk), and"publishConfig": { "access": "public" }topackages/bridging-sdk/package.jsonso@goodsdks/bridging-sdkmatches the publication invariants of the other@goodsdks/*packages and unblocks downstreamGoodWidgetinstalls.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)