Repository navigation
feat: add AbortSignal support to announcement streams - #224
Conversation
|
@official-rex Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
This PR only adds a test file. The announcement stream implementation is unchanged, so pending RPC requests and pagination are not cancelled. Please add the signal plumbing, put tests under the existing test tree, and fix formatting. |
Adds options.signal to fetchAnnouncementsStream and threads it into every Soroban RPC and Horizon request so pending requests are aborted and pagination stops. mergeOrdered now closes every chunk iterator on abort, and the abort tests move from tests/ under the existing test/chains/stellar tree.
|
@truthixify Added the actual signal plumbing instead of only a test file.
Verified locally on a checkout of the branch merged with |
|
@truthixify Verified head
Could you take another look? |
|
Merged. The signal now reaches every RPC path, aborts in-flight work, and closes parallel iterators. Thanks @official-rex. |
Overview
Adds AbortSignal support to announcement streams so callers can cancel long-running or infinite stream subscriptions cleanly. When the signal fires, the stream throws a standard
AbortErrorand releases resources.Related Issue
Closes #200
Changes
[MODIFY]
packages/sdk-svelte/src/primitives/useStellarAnnouncementScan.tsoptions.signal?: AbortSignalparameter to stream functions.signal.abortedand throwAbortErrorwhen cancelled.[ADD]
tests/abort-signal.test.tsVerification Results