[BUG] disconnectAll() doesn't emit an individual disconnect event per wallet, only a single generic 'allDisconnected' event

Open Beginner friendly
#1,007 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

Start by locating the wallet manager’s disconnectAll() implementation and the code that emits the per-wallet disconnected event; the issue identifies these event paths but gives no file or test names. Check existing wallet event tests first, then reproduce the two-wallet case and verify that each wallet emits disconnected when bulk disconnect completes.

Written by the indexing model from the issue text.

Description

bug difficulty: easy good first issue priority: low sdk security

Description

disconnectAll() disconnects every connected wallet in a multi-wallet session but only emits one generic allDisconnected event rather than the usual per-wallet disconnected event for each one, breaking any listener registered for the normal per-wallet event.

Component

wallet

Steps to Reproduce

  1. Connect two wallets.
  2. Register a disconnected event listener (the normal per-wallet event).
  3. Call disconnectAll().

Expected Behavior

disconnectAll() should emit the normal per-wallet disconnected event for each wallet being disconnected, in addition to (or instead of) any aggregate event.

Actual Behavior

Listeners registered for the standard per-wallet disconnect event never fire during a bulk disconnect, silently missing state changes they'd normally react to.

Environment

  • SDK version: 0.3.x
  • Node version: 20.x, 22.x
  • OS: macOS / Linux
  • Network: TESTNET

Code Example

await walletManager.disconnectAll();

Error Output

N/A — no thrown error; behavior is incorrect but silent.

Difficulty

🟢 Easy

Additional Context

disconnectAll() was implemented as a separate code path that emits its own aggregate event instead of looping and emitting the standard per-wallet event for each.

Dominant language
TypeScript
Stars
0
Forks
73
Avg merge
6h 26m
Merged PRs (30d)
37

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from trustflow-protocol/trustflow-sdk

All issues in trustflow-protocol/trustflow-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.