From 4bc36155aefe1a231fb177a186088502b16e4a81 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 28 Dec 2023 03:14:18 +0100 Subject: [PATCH] Add more TODO comments --- components/webln.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/webln.js b/components/webln.js index 6b8bb41347..72f4c52de5 100644 --- a/components/webln.js +++ b/components/webln.js @@ -81,9 +81,11 @@ export function WebLNProvider ({ children }) { }, []) // poll balance + // TODO is there a better way? useEffect(() => { if (!provider) return - const BALANCE_POLL = 15000 // 1 minute + // TODO check rate limiting of services - is every 15 seconds too often? (it probably is) + const BALANCE_POLL = 15000 // 15 seconds const interval = setInterval(() => { provider?.getBalance().then(({ balance }) => setBalance(balance)).catch(console.error) }, BALANCE_POLL)