Repository navigation
fix: add batchUpdates option to WalletStatusTracker and verify transport cleanup - #820
Merged
Just-Bamford merged 1 commit intoOct 17, 2026
Conversation
…ort cleanup Closes Sorokit#761 Closes Sorokit#748 Closes Sorokit#760 Closes Sorokit#749
|
@opascal221-design 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 #761
Closes #748
Closes #760
Closes #749
Summary
WalletStatusTrackerstatus events are synchronous — no buffering for rapid state changes #761 — AddsbatchUpdates?: booleantoWalletStatusTrackerConfig. When enabled, rapid state changes within the same microtask checkpoint are coalesced viaqueueMicrotask, so listeners receive at most one notification per flush with the latest state. Defaults tofalse(synchronous, unchanged behaviour).registerLogTransportnever removes transports on unsubscribe — memory leak in log pipeline #748 — Adds a test verifying that the cleanup function returned byregisterLogTransportactually removes the transport: logs afterunregister()are not delivered to the transport.linkedAccountsindiscovery.tsis module-level state — persists across tests and process instances #760 —clearLinkedAccounts()already exported and called inbeforeEachin wallet tests; no further code change needed.validateTransactionhardcodes fee bounds — does not reflect network congestion #749 —ValidationRulesalready acceptsminFee/maxFeeoverrides used byvalidateTransaction; no further code change needed.Changes
src/wallet/walletStatusTracker.ts— addedbatchUpdatesconfig option,_flushPendingflag, microtask-based coalescing in_emit(), and_flushPendingreset indestroy()src/tests/walletStatusTracker.test.ts— three new tests: coalescing, synchronous fallback, and post-destroy safetysrc/tests/logger.test.ts— one new test confirming transport removal on unregister