mirror of https://github.com/waku-org/js-waku.git
Touch up
This commit is contained in:
parent
ef27afbbf9
commit
dbc6662082
|
@ -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({
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue