fix: resolve issues #532-#535 - GovernorConfig, scVal parsing, GraphQL variables, and fromStroops - #659
Merged
Jaydbrown merged 1 commit intoSep 3, 2026
Conversation
- conduit-protocol#532: Add maxDurationSeconds to GovernorConfig type and parseGovernorConfig - conduit-protocol#533: Use scValToU32 for feeBps and getTokenDecimals instead of raw .u32() - conduit-protocol#534: Use bigintSafeStringify for GraphQL variables in query and subscribe - conduit-protocol#535: Fix fromStroops for negative input by handling sign separately
|
@Levi-Ojukwu 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! 🚀 |
Jaydbrown
added a commit
that referenced
this pull request
Sep 3, 2026
main's Test job had 22 failing tests (7 files) predating the recent batch merges. Three root causes, two of them real bugs: - src/builder.ts: StreamBuilder.build() emitted a raw `number` amount when given one, but ConduitBatcher's payload validation (added for the #532-#535 precision-safety work) rejects numeric amounts — so `new StreamBuilder().amount(100).build()` produced output execute() refused. Coerce amount to string in build() (same fix already applied to ratePerSecond, #459); declared return type corrected to `amount: string`. - src/relayer/WebSocketRelayer.ts: attemptReconnect() only re-checked isDestroyed after the backoff delay, not reconnectEnabled, so a disconnect() during the delay window still opened a second socket (#619). Also bail on !reconnectEnabled. - Tests: numeric `amount` literals updated to bigint/string across the batcher tests; utils zero-duration test now expects the #536 throw; governor test mock gains the `scValToU32` export governor.ts now uses (#659). 1021 tests pass, tsc clean, lint clean (6 pre-existing warnings), build ok.
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.
Summary
Resolves four issues in the streamFi SDK:
closes #532 : Add maxDurationSeconds to GovernorConfig
maxDurationSeconds: numberto theGovernorConfiginterface insrc/types/index.tsparseGovernorConfiginsrc/governor.tsto parse themax_duration_secondsfield from the on-chain responsecloses #533 : Use scValToU32 for type-safe parsing
.u32()calls withscValToU32()insrc/governor.tsforfeeBpsparsinggetTokenDecimalsinsrc/soroban.tsto usescValToU32()instead of raw.u32()closes #534 : Use bigintSafeStringify for GraphQL variables
bigintSafeStringifyfromsrc/utils.tsinsrc/indexer.tsbigintSafeStringifyto variables beforeJSON.stringifyin bothquery()andsubscribe()methodsTypeError: Do not know how to serialize a BigIntin Node and silent{}serialization in Safaricloses #535 : Fix fromStroops for negative input
fromStroopsinsrc/utils.tsto handle the sign separately using absolute value"-1.-0"for negative stroop valuesTesting
npm run typecheckpassesnpm run lintpasses (only pre-existing warnings)