Repository navigation
fix(privy-integration): bound unbounded fee-payer fetch with 30s AbortSignal.timeout - #2573
Open
hermiondev wants to merge 1 commit into
Open
hermiondev wants to merge 1 commit into
hermiondev wants to merge 1 commit into
Conversation
…tSignal.timeout createSolanaSponsoredTransaction POSTs to alchemy_requestFeePayer with a bare fetch (no timeout/AbortSignal). A stalled Alchemy endpoint hangs sponsored transaction construction forever. Reproduced vs a stall server: unfixed shape pending past 8s watchdog; patched shape rejects TimeoutError at 3001ms. Same treatment as signer base.ts/solana.ts in alchemyplatform#2572, which missed this site (separate package). Feature-detected for runtimes without AbortSignal.timeout.
hermiondev
requested review from
Richard-Dang,
blakecduncan,
florrdv,
jakehobbs,
niveda-krish and
thebrianchen
as code owners
September 27, 2026 22:19
This branch has not been 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.
Problem
createSolanaSponsoredTransaction(account-kit/privy-integration) POSTs toalchemy_requestFeePayerwith a barefetch— no timeout, no AbortSignal (src/util/createSolanaSponsoredTransaction.ts:60, shipped in @account-kit/privy-integration@4.88.5 dist/esm/util/createSolanaSponsoredTransaction.js:44).If the fee-payer RPC endpoint accepts the connection but never replies, sponsored transaction construction hangs forever — no error, no timeout, the caller awaits indefinitely.
This is the same defect class fixed for the signer package in #2572; that PR covers
signer/src/client/base.tsandsigner/src/utils/solana.tsbut the privy-integration package has its own copy of the pattern and was missed.Reproduction
Node 20, stall server (accepts, never replies), same options shape as the source:
signal: AbortSignal.timeout(3000)):TimeoutErrorat ~3001msFix
signal: AbortSignal.timeout ? AbortSignal.timeout(30_000) : undefinedadded to the request options — feature-detected so runtimes withoutAbortSignal.timeoutkeep working unchanged. 1 file, +4/-0.Validation
tsc -p account-kit/privy-integration/tsconfig.build.json --noEmit: error count identical pre/post-fix (40 pre-existing module-resolution errors in this workspace state, 0 new)PR-Codex overview
This PR adds a timeout feature to the fee-payer request in the
createSolanaSponsoredTransaction.tsfile to prevent indefinite hanging during sponsored transaction construction if the RPC endpoint does not respond.Detailed summary
AbortSignal.timeout.