mirror of
https://github.com/waku-org/js-waku.git
synced 2025-02-19 23:58:11 +00:00
Workaround the fact that ni-waku does not accept integers as timestamp
This commit is contained in:
parent
5a4d7cfb09
commit
d035359616
@ -181,6 +181,11 @@ export class NimWaku {
|
|||||||
let timestamp;
|
let timestamp;
|
||||||
if (message.timestamp) {
|
if (message.timestamp) {
|
||||||
timestamp = message.timestamp.valueOf() / 1000;
|
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 = {
|
const rpcMessage = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user