mirror of
https://github.com/logos-messaging/examples.waku.org.git
synced 2026-01-05 22:33:08 +00:00
fix import
This commit is contained in:
parent
774abec351
commit
20538d471c
@ -47,7 +47,8 @@
|
||||
waitForRemotePeer,
|
||||
createEncoder,
|
||||
createDecoder,
|
||||
utils,
|
||||
utf8ToBytes,
|
||||
bytesToUtf8,
|
||||
} from "https://unpkg.com/@waku/sdk@0.0.16/bundle/index.js";
|
||||
|
||||
const peerIdDiv = document.getElementById("peer-id");
|
||||
@ -101,7 +102,7 @@
|
||||
};
|
||||
|
||||
const callback = (wakuMessage) => {
|
||||
const text = utils.bytesToUtf8(wakuMessage.payload);
|
||||
const text = bytesToUtf8(wakuMessage.payload);
|
||||
const timestamp = wakuMessage.timestamp.toString();
|
||||
messages.push(text + " - " + timestamp);
|
||||
updateMessages(messages, messagesDiv);
|
||||
@ -124,7 +125,7 @@
|
||||
const text = textInput.value;
|
||||
|
||||
await node.lightPush.send(encoder, {
|
||||
payload: utils.utf8ToBytes(text),
|
||||
payload: utf8ToBytes(text),
|
||||
});
|
||||
console.log("Message sent!");
|
||||
textInput.value = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user