Description
useWallet's connect() has no catch, only a finally. If anything it awaits (connectWallet(), or the getAddress/getNetwork calls inside it) ever rejects rather than resolving to an error-state object, the rejection is unhandled: connecting resets, but the user gets no feedback at all, and the error only surfaces as a silent unhandled-promise-rejection in the console.
Steps to reproduce
- Open the demo app with Freighter installed and unlocked.
- Simulate a rejected promise somewhere in the
connect() chain (e.g. temporarily throw inside resolveConnectedState() in src/lib/wallet.ts, or trigger a genuine Freighter extension messaging failure by disabling/reloading the extension mid-call).
- Click "Connect wallet".
Expected behavior
The UI shows some indication that the connection attempt failed (a toast, an inline message, anything), matching the error-surfacing pattern already used elsewhere in the app (e.g. MilestoneRow.tsx's run() wrapper, which catches and surfaces contract-call errors).
Actual behavior
connecting flips back to false (via finally), but wallet state never updates and no error is shown. The failure is invisible to the user; only a console error (if any) hints at what happened.
Environment
- Network: testnet
- Contract: n/a (this is demo-app-only,
demos/freelance-escrow)
- Commit or tag: main
Possible impact
No fund-safety or contract-state impact; this is a demo-app UX bug (silent failure on wallet connect), not a security issue.
Description
useWallet'sconnect()has nocatch, only afinally. If anything it awaits (connectWallet(), or thegetAddress/getNetworkcalls inside it) ever rejects rather than resolving to an error-state object, the rejection is unhandled:connectingresets, but the user gets no feedback at all, and the error only surfaces as a silent unhandled-promise-rejection in the console.Steps to reproduce
connect()chain (e.g. temporarily throw insideresolveConnectedState()insrc/lib/wallet.ts, or trigger a genuine Freighter extension messaging failure by disabling/reloading the extension mid-call).Expected behavior
The UI shows some indication that the connection attempt failed (a toast, an inline message, anything), matching the error-surfacing pattern already used elsewhere in the app (e.g.
MilestoneRow.tsx'srun()wrapper, which catches and surfaces contract-call errors).Actual behavior
connectingflips back tofalse(viafinally), butwalletstate never updates and no error is shown. The failure is invisible to the user; only a console error (if any) hints at what happened.Environment
demos/freelance-escrow)Possible impact
No fund-safety or contract-state impact; this is a demo-app UX bug (silent failure on wallet connect), not a security issue.