mirror of
https://github.com/status-im/js-waku.git
synced 2025-02-22 09:58:10 +00:00
Reference GitHub issues
This commit is contained in:
parent
58838ec898
commit
f15f4ff7f2
@ -28,6 +28,7 @@ import { ChatMessage } from './chat_message';
|
|||||||
const waku = await Waku.create({ listenAddresses: [opts.listenAddr] });
|
const waku = await Waku.create({ listenAddresses: [opts.listenAddr] });
|
||||||
|
|
||||||
// TODO: Bubble event to waku, infer topic, decode msg
|
// TODO: Bubble event to waku, infer topic, decode msg
|
||||||
|
// Tracked with https://github.com/status-im/js-waku/issues/19
|
||||||
waku.libp2p.pubsub.on(TOPIC, (event) => {
|
waku.libp2p.pubsub.on(TOPIC, (event) => {
|
||||||
const wakuMsg = Message.decode(event.data);
|
const wakuMsg = Message.decode(event.data);
|
||||||
if (wakuMsg.payload) {
|
if (wakuMsg.payload) {
|
||||||
@ -55,9 +56,11 @@ import { ChatMessage } from './chat_message';
|
|||||||
);
|
);
|
||||||
|
|
||||||
// TODO: identify if it is possible to listen to an event to confirm dial
|
// TODO: identify if it is possible to listen to an event to confirm dial
|
||||||
// finished instead of an arbitrary delay.
|
// finished instead of an arbitrary delay. Tracked with
|
||||||
|
// https://github.com/status-im/js-waku/issues/18
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
// TODO: Automatically subscribe
|
// TODO: Automatically subscribe, tracked with
|
||||||
|
// https://github.com/status-im/js-waku/issues/17
|
||||||
await waku.relay.subscribe();
|
await waku.relay.subscribe();
|
||||||
console.log('Subscribed to waku relay');
|
console.log('Subscribed to waku relay');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user