fix: delay store query as there is an issue with libp2p peer store
This commit is contained in:
parent
568f3f83f2
commit
ee4119eefe
|
@ -58,15 +58,20 @@ function App() {
|
||||||
// 7 days/week, 24 hours/day, 60min/hour, 60secs/min, 100ms/sec
|
// 7 days/week, 24 hours/day, 60min/hour, 60secs/min, 100ms/sec
|
||||||
startTime.setTime(startTime.getTime() - 7 * 24 * 60 * 60 * 1000);
|
startTime.setTime(startTime.getTime() - 7 * 24 * 60 * 60 * 1000);
|
||||||
|
|
||||||
waku.store
|
// TODO: Remove this timeout once https://github.com/status-im/js-waku/issues/913 is done
|
||||||
.queryHistory([ContentTopic], {
|
setTimeout(
|
||||||
callback: processMessages,
|
() =>
|
||||||
timeFilter: { startTime, endTime: new Date() },
|
waku.store
|
||||||
})
|
.queryHistory([ContentTopic], {
|
||||||
.catch((e) => {
|
callback: processMessages,
|
||||||
console.log("Failed to retrieve messages", e);
|
timeFilter: { startTime, endTime: new Date() },
|
||||||
setWakuStatus("Error Encountered");
|
})
|
||||||
});
|
.catch((e) => {
|
||||||
|
console.log("Failed to retrieve messages", e);
|
||||||
|
setWakuStatus("Error Encountered");
|
||||||
|
}),
|
||||||
|
200
|
||||||
|
);
|
||||||
}, [waku, wakuStatus]);
|
}, [waku, wakuStatus]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue