From 5834f07d47b45f4ddf4df214ee166ac2f1c22d40 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 12 Sep 2022 19:02:23 +1000 Subject: [PATCH] fix(store-reactjs): use test fleet Messages retrieved are coming from web-chat which currently uses test fleet. --- store-reactjs-chat/src/App.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/store-reactjs-chat/src/App.js b/store-reactjs-chat/src/App.js index e65acb9..ae5e93a 100644 --- a/store-reactjs-chat/src/App.js +++ b/store-reactjs-chat/src/App.js @@ -2,6 +2,11 @@ import { waitForRemotePeer, utils } from "js-waku"; import * as React from "react"; import protobuf from "protobufjs"; import { createWaku } from "js-waku/lib/create_waku"; +import { + Fleet, + getPredefinedBootstrapNodes, +} from "js-waku/lib/predefined_bootstrap_nodes"; +import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list"; const ContentTopic = "/toy-chat/2/huilong/proto"; @@ -20,7 +25,13 @@ function App() { setWakuStatus("Starting"); - createWaku({ defaultBootstrap: true }).then((waku) => { + createWaku({ + libp2p: { + peerDiscovery: [ + new PeerDiscoveryStaticPeers(getPredefinedBootstrapNodes(Fleet.Test)), + ], + }, + }).then((waku) => { waku.start().then(() => { setWaku(waku); setWakuStatus("Connecting");