From 3ae5eb3c88649b0fb59456c9b27dce0254b050a0 Mon Sep 17 00:00:00 2001 From: status-im-auto Date: Sat, 8 Oct 2022 03:35:56 +0000 Subject: [PATCH] Updates --- rln-js/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rln-js/index.html b/rln-js/index.html index 72cc85f..540d1c6 100644 --- a/rln-js/index.html +++ b/rln-js/index.html @@ -379,7 +379,7 @@ const callback = (wakuMessage) => { const {timestamp, nick, text} = ProtoChatMessage.decode(wakuMessage.payload) const time = new Date(); - time.setTime(Number(timestamp)); + time.setTime(Number(timestamp) * 1000); let proofState, verify; if (typeof wakuMessage.rateLimitProof === "undefined") { @@ -432,7 +432,7 @@ sendButton.onclick = async () => { const text = utils.utf8ToBytes(textInput.value); const timestamp = new Date(); - const msg = ProtoChatMessage.create({text, nick: nicknameInput.value, timestamp: timestamp.valueOf()}); + const msg = ProtoChatMessage.create({text, nick: nicknameInput.value, timestamp: Math.floor(timestamp.valueOf() / 1000)}); const payload = ProtoChatMessage.encode(msg).finish(); console.log("Sending message with proof...") sendingStatusSpan.innerText = 'sending...'