From c8300d4dfcbb13e43e5919839f4f5e51e7ca6f66 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 24 Feb 2022 12:21:24 +1100 Subject: [PATCH] Update nwaku RPC with nanoseconds timestamp --- src/test_utils/nim_waku.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/test_utils/nim_waku.ts b/src/test_utils/nim_waku.ts index d93fe14ea7..608beed562 100644 --- a/src/test_utils/nim_waku.ts +++ b/src/test_utils/nim_waku.ts @@ -64,7 +64,7 @@ export interface KeyPair { export interface WakuRelayMessage { payload: string; contentTopic?: string; - timestamp?: number; // Float in seconds + timestamp?: number; // Integer in seconds } export class NimWaku { @@ -194,12 +194,7 @@ export class NimWaku { } let timestamp; if (message.timestamp) { - timestamp = message.timestamp.valueOf() / 1000; - if (Number.isInteger(timestamp)) { - // Add a millisecond to ensure it's not an integer - // Until https://github.com/status-im/nim-waku/issues/691 is done - timestamp += 0.001; - } + timestamp = message.timestamp.valueOf() * 1000; } const rpcMessage = {