feat: use same content topics across examples when possible

All examples do not connect to the same fleet at the moment so the gain is limited.
This commit is contained in:
fryorcraken.eth 2022-09-20 11:15:43 +10:00
parent a895f2cc4d
commit 52a58ea845
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
4 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@
const textInput = document.getElementById('textInput');
const sendButton = document.getElementById('sendButton');
const ContentTopic = "/light-js/0/message/utf8";
const ContentTopic = "/js-waku-examples/1/chat/utf8";
let messages = []
let unsubscribe;

View File

@ -19,7 +19,7 @@ interface MessageInterface {
styleUrls: ["./messages.component.css"],
})
export class MessagesComponent implements OnInit {
contentTopic: string = `/relay-angular-chat/1/chat/proto`;
contentTopic: string = `/js-waku-examples/1/chat/proto`;
messages: MessageInterface[] = [];
messageCount: number = 0;
waku!: WakuPrivacy;

View File

@ -50,7 +50,7 @@
// Recommendation: `/dapp-name/version/functionality/codec`
// We recommend to use protobuf as codec (`proto`), this demo uses utf-8
// for simplicity's sake.
const contentTopic = '/relay-demo/1/message/utf-8';
const contentTopic = '/js-waku-examples/1/chat/utf8';
try {
statusDiv.innerHTML = '<p>Starting</p>';

View File

@ -4,7 +4,7 @@ import protobuf from "protobufjs";
import { createPrivacyNode } from "js-waku/lib/create_waku";
import { waitForRemotePeer } from "js-waku/lib/wait_for_remote_peer";
const ContentTopic = `/relay-reactjs-chat/1/chat/proto`;
const ContentTopic = `/js-waku-examples/1/chat/proto`;
const SimpleChatMessage = new protobuf.Type("SimpleChatMessage")
.add(new protobuf.Field("timestamp", 1, "uint32"))