From d035359616ec61ac30a0649caf7bd60dfcad8e9f Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 5 Aug 2021 13:32:37 +1000 Subject: [PATCH] Workaround the fact that ni-waku does not accept integers as timestamp --- src/test_utils/nim_waku.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test_utils/nim_waku.ts b/src/test_utils/nim_waku.ts index c6b78c2997..6bf7cc716d 100644 --- a/src/test_utils/nim_waku.ts +++ b/src/test_utils/nim_waku.ts @@ -181,6 +181,11 @@ 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; + } } const rpcMessage = {