fix: delay store query as there is an issue with libp2p peer store
This commit is contained in:
parent
568f3f83f2
commit
ee4119eefe
|
@ -58,6 +58,9 @@ 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);
|
||||||
|
|
||||||
|
// TODO: Remove this timeout once https://github.com/status-im/js-waku/issues/913 is done
|
||||||
|
setTimeout(
|
||||||
|
() =>
|
||||||
waku.store
|
waku.store
|
||||||
.queryHistory([ContentTopic], {
|
.queryHistory([ContentTopic], {
|
||||||
callback: processMessages,
|
callback: processMessages,
|
||||||
|
@ -66,7 +69,9 @@ function App() {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log("Failed to retrieve messages", e);
|
console.log("Failed to retrieve messages", e);
|
||||||
setWakuStatus("Error Encountered");
|
setWakuStatus("Error Encountered");
|
||||||
});
|
}),
|
||||||
|
200
|
||||||
|
);
|
||||||
}, [waku, wakuStatus]);
|
}, [waku, wakuStatus]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue