Timeout WalletConnect disconnect and clear stale session - #241
Merged
Jaydbrown merged 1 commit intoJul 29, 2026
Conversation
Wrap remote disconnect calls in the existing timeout helper and clear local session state in a finally block so stale sessions are not retained when the wallet rejects or stalls. Add regression coverage for rejected and timed-out disconnects. Fixes conduit-protocol#190.
Jaydbrown
added a commit
that referenced
this pull request
Jul 29, 2026
- governor.ts: parseGovernorConfig assigned 'undefined' directly to optional GovernorConfig fields, which exactOptionalPropertyTypes (true in tsconfig) rejects — a key must be entirely absent, not present with value undefined. Switched to conditional spreads. Regression from #231. - builder-validation-bypass.test.ts: the fixture-address fix from #175 never actually landed — I'd edited this file locally but forgot to stage it before that PR's final commit, so the squash-merge only included the earlier (broken-placeholder-address) revision. Reapplying the same fix now: replace the invalid 55-character StrKey strings with genuinely valid, checksummed addresses. - walletconnect.test.ts: 'times out a stalled remote disconnect' (#241) left its returned promise unobserved for one microtask tick under fake timers, producing a 'handled asynchronously' unhandled-rejection warning that vitest sometimes misattributes to an unrelated test in the same run. Attach a no-op .catch() immediately to keep it always-handled; behavior/assertions are unchanged.
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
finallyblock so rejected/stalled disconnects do not leave stale local stateFixes #190.
Validation
git diff --checkI did not run the Vitest suite locally because dependencies are not installed in this workspace and I avoided installing project packages.