From 4ca440d27e33a4c2e1f992bfd5eabcc6415a4848 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 12 Jul 2021 17:13:28 +1000 Subject: [PATCH] List relay and light push peers numbers instead of any peer --- examples/eth-dm/src/App.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/eth-dm/src/App.tsx b/examples/eth-dm/src/App.tsx index 293ca03aeb..8c1f5d0a8c 100644 --- a/examples/eth-dm/src/App.tsx +++ b/examples/eth-dm/src/App.tsx @@ -161,9 +161,11 @@ function App() { }; }, [waku, address, ethDmKeyPair]); - let peers = 0; + let relayPeers = 0; + let lightPushPeers = 0; if (waku) { - peers = waku.libp2p.connectionManager.connections.size; + relayPeers = waku.relay.getPeers().size; + lightPushPeers = waku.lightPush.peers.length; } let addressDisplay = ''; @@ -188,7 +190,7 @@ function App() { /> - {peers} peer{peers && peers > 1 ? 's' : ''} + Peers: {relayPeers} relay, {lightPushPeers} light push Ethereum Direct Message