fix(store-reactjs): use test fleet

Messages retrieved are coming from web-chat which currently uses test fleet.
This commit is contained in:
fryorcraken.eth 2022-09-12 19:02:23 +10:00
parent 4538823d1b
commit 5834f07d47
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 12 additions and 1 deletions

View File

@ -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");