mirror of https://github.com/waku-org/js-waku.git
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;
|
||||
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 = {
|
||||
|
|
Loading…
Reference in New Issue