chore: upgrade @waku/*

This commit is contained in:
danisharora099 2023-09-12 00:14:54 +08:00
parent b688b42e86
commit 5e240d0e3b
No known key found for this signature in database
GPG Key ID: FBD2BF500037F135
4 changed files with 1102 additions and 1570 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,13 @@
"homepage": "/web-chat",
"dependencies": {
"@libp2p/bootstrap": "^8.0.0",
"@waku/react": "^0.0.4-fe5b4c4",
"@waku/dns-discovery": "^0.0.15",
"@waku/interfaces": "^0.0.17",
"@waku/peer-exchange": "^0.0.15",
"@waku/react": "^0.0.5-effaf55",
"@waku/dns-discovery": "^0.0.17",
"@waku/interfaces": "^0.0.18",
"@waku/peer-exchange": "^0.0.16",
"@livechat/ui-kit": "^0.5.0-24",
"@multiformats/multiaddr": "12.1.5",
"@waku/sdk": "^0.0.18",
"@waku/sdk": "^0.0.19",
"process": "^0.11.10",
"protons-runtime": "^4.0.1",
"react": "^17.0.2",

View File

@ -90,7 +90,13 @@ function connections(waku: LightNode | undefined): string[] {
let strConnections = " connections: \n";
waku.libp2p.getConnections().forEach((connection) => {
strConnections += connection.remotePeer.toString() + ", ";
strConnections += JSON.stringify(connection.stat);
strConnections += JSON.stringify({
direction: connection.direction,
timeline: connection.timeline,
multiplexer: connection.multiplexer,
encryption: connection.encryption,
status: connection.status,
});
strConnections += "; " + JSON.stringify(connection.streams);
strConnections += "\n";
});

View File

@ -188,7 +188,7 @@ export const usePeers = (params: UsePeersParams): UsePeersResults => {
setPeers({
allConnected: peers.map((p) => p.id),
storePeers: peers
.filter((p) => p.protocols.includes(waku.StoreCodec))
.filter((p) => p.protocols.includes(waku.waku_store.StoreCodec))
.map((p) => p.id),
//TODO: use from import
filterPeers: peers
@ -197,7 +197,7 @@ export const usePeers = (params: UsePeersParams): UsePeersResults => {
)
.map((p) => p.id), // hardcoding codec since we don't export it currently
lightPushPeers: peers
.filter((p) => p.protocols.includes(waku.LightPushCodec))
.filter((p) => p.protocols.includes(waku.waku_store.StoreCodec))
.map((p) => p.id),
});
};