You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
canton-connect puts no bound of its own on sdk.connect(). #49 fixed the reported cases by polling popup.closed in guardedConnect, which covers closes only. A wallet that opens, sits and never answers with its window still open leaves isConnecting true forever, and a consumer cannot recover: connect() exposes no abort.
Steps to reproduce
Render a consumer of useCantonConnect and call connect()
Pick a wallet in the picker
Leave the wallet window open and never approve or reject
Observe isConnecting stays true, with no error and no way to cancel
Expected vs actual behavior
Expected: the wait ends at a documented bound, connectError is set and isConnecting returns to false; a completion landing after that bound is reconciled into the connected state. Actual:isConnecting stays true indefinitely and only a reload clears it.
Reconcile during a live session too: an app-initiated cancel abandons the in-flight sdk.connect(), and a wallet-side disconnect push is byte-identical to a lock
A connect that never settles: isConnecting returns to false and connectError is set, with fake timers advanced inside act because waitFor polls on real timers
The reconcile path: settle after the timeout and assert the party appears
Description
canton-connectputs no bound of its own onsdk.connect(). #49 fixed the reported cases by pollingpopup.closedinguardedConnect, which covers closes only. A wallet that opens, sits and never answers with its window still open leavesisConnectingtrue forever, and a consumer cannot recover:connect()exposes no abort.Steps to reproduce
useCantonConnectand callconnect()isConnectingstays true, with no error and no way to cancelExpected vs actual behavior
Expected: the wait ends at a documented bound,
connectErroris set andisConnectingreturns to false; a completion landing after that bound is reconciled into the connected state.Actual:
isConnectingstays true indefinitely and only a reload clears it.Additional context
Split from #49. Blocked by BootNodeDev/cn-dappbooster#85.
Scope:
connectTimeoutMstoCantonConnectConfigwith a documented defaultconnectErrorand run the samesdk.status()probe the cancelled path uses, so a session that survived the attempt is keptDappSDKprecisely so no late completion can land, but here the window may still be open and the user may still finishsdk.connect(), and a wallet-side disconnect push is byte-identical to a lockCantonConnectProvider.tsx;canton-connect/CLAUDE.mdforbids a lifecycle rule living in both modelsTests:
isConnectingreturns to false andconnectErroris set, with fake timers advanced insideactbecausewaitForpolls on real timers