Skip to content

Commit 7a5340b

Browse files
authored
chore: reset interval (#383)
1 parent 544a6c5 commit 7a5340b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/contexts/W3iContext/hooks/notifyHooks.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,15 @@ export const useNotifyState = (w3iProxy: Web3InboxProxy, proxyReady: boolean) =>
4949
// it takes time for handshake (watch subscriptions) to complete
5050
// load in progress state using interval until it is
5151
useEffect(() => {
52-
if (notifyClient?.hasFinishedInitialLoad()) {
53-
setWatchSubscriptionsComplete(true)
52+
if(watchSubscriptionsComplete) {
53+
return noop;
5454
}
5555
// Account for sync init
5656
const intervalId = setInterval(() => {
57+
if (notifyClient?.hasFinishedInitialLoad()) {
58+
setWatchSubscriptionsComplete(true)
59+
return noop;
60+
}
5761
refreshNotifyState()
5862
}, 100)
5963

0 commit comments

Comments
 (0)