diff --git a/examples/light-js/index.html b/examples/light-js/index.html index 802bab7..bafc49e 100644 --- a/examples/light-js/index.html +++ b/examples/light-js/index.html @@ -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;