Repository navigation
fix: add emptyPollDelayMs option to stream poller and warn on large balances - #818
Merged
Just-Bamford merged 1 commit intoOct 17, 2026
Conversation
…alances Closes Sorokit#750 Closes Sorokit#751 Closes Sorokit#753 Closes Sorokit#754
|
@aniokedianne 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 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 #750
Closes #751
Closes #753
Closes #754
Summary
streamContractEventsRealTimeresets backoff on every successful poll — no early exit on empty results #750 — AddsemptyPollDelayMsoption toStreamContractEventsOptions. When a poll succeeds but returns no new events, the next tick usesemptyPollDelayMs(defaults tointervalMs) instead of always resetting tobaseInterval. Callers can set a shorter value (e.g.100) to poll more responsively during idle periods.readContractusesparseFloatfor balance conversion — loses precision for large balances #751 — Adds aconsole.warningetAccount.tswhen a parsed balance exceedsNumber.MAX_SAFE_INTEGER, directing callers to use the raw stringbalancefield for full precision.buildAtomicSwapaccepts any object with asset-like shape — does not validate issuers are valid public keys #753 —asAssetinatomicSwap.tsalready validates issuers withStrKey.isValidEd25519PublicKey; no further changes needed.compose()does not validate that chained operations are compatible — allows nonsensical txs #754 —compose.tsalready handles all required operation types; no further changes needed.Changes
src/soroban/types.ts— addedemptyPollDelayMs?: numbertoStreamContractEventsOptionssrc/soroban/streamContractEventsRealTime.ts— useemptyPollDelayMswhen poll returns no new eventssrc/account/getAccount.ts— warn when balance exceedsNumber.MAX_SAFE_INTEGERsrc/tests/contractEvents.test.ts— new test verifyingemptyPollDelayMsis used as next-tick delay on empty polls