diff --git a/examples/min-js-web-chat/src/App.js b/examples/min-js-web-chat/src/App.js index dcb0382d19..2f34ad362b 100644 --- a/examples/min-js-web-chat/src/App.js +++ b/examples/min-js-web-chat/src/App.js @@ -63,7 +63,7 @@ function App() { const sendMessageOnClick = () => { if (wakuStatus !== 'Ready') return; - sendMessage(`Here is message #${sendCounter}`, waku, new Date()).then(() => + sendMessage(`Here is message #${sendCounter}`, new Date(), waku).then(() => console.log('Message sent') ); @@ -100,7 +100,7 @@ async function bootstrapWaku(waku) { await Promise.all(nodes.map((addr) => waku.dial(addr))); } -async function sendMessage(message, waku, timestamp) { +async function sendMessage(message, timestamp, waku) { const time = timestamp.getTime(); const payload = proto.SimpleChatMessage.encode({ diff --git a/guides/reactjs-relay.md b/guides/reactjs-relay.md index 559c91f913..9b1a8788d8 100644 --- a/guides/reactjs-relay.md +++ b/guides/reactjs-relay.md @@ -54,7 +54,7 @@ function App() { React.useEffect(() => { // If Waku is already assigned, the job is done if (!!waku) return; - // If Waku status not None, it means we already started Waku + // If Waku status not None, it means we are already starting Waku if (wakuStatus !== 'None') return; setWakuStatus('Starting'); @@ -147,7 +147,7 @@ import { WakuMessage } from 'js-waku'; const ContentTopic = `/min-js-web-chat/1/chat/proto`; -async function sendMessage(message, waku, timestamp) { +async function sendMessage(message, timestamp, waku) { const time = timestamp.getTime(); // Encode to protobuf