From 75297b9987f64fc124825aceba0daab201610523 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 1 Jul 2021 16:48:56 +1000 Subject: [PATCH] Display # of connections --- examples/eth-dm/src/App.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/eth-dm/src/App.tsx b/examples/eth-dm/src/App.tsx index b375f0cfbc..12590f370e 100644 --- a/examples/eth-dm/src/App.tsx +++ b/examples/eth-dm/src/App.tsx @@ -83,6 +83,11 @@ function App() { .then((address) => setAddress(address)); }); + let peers; + if (waku) { + peers = waku.libp2p.connectionManager.connections.size; + } + return (
@@ -99,6 +104,7 @@ function App() { style={waku ? { color: green[500] } : {}} /> + {peers}