()
| 393 | const iv = setInterval(fetchPositions, 30_000); |
| 394 | let posTimer: ReturnType<typeof setTimeout> | null = null; |
| 395 | const onRefreshPositions = () => { |
| 396 | if (posTimer) clearTimeout(posTimer); |
| 397 | posTimer = setTimeout(() => { void fetchPositions(); }, 200); |
| 398 | }; |
| 399 | window.addEventListener("polyworld:refresh-header-balance", onRefreshPositions); |
| 400 | return () => { cancelled = true; clearInterval(iv); if (posTimer) clearTimeout(posTimer); window.removeEventListener("polyworld:refresh-header-balance", onRefreshPositions); }; |
| 401 | }, [effectiveProxy]); |
nothing calls this directly
no test coverage detected