From 6e75b9d27482ae97078ffed500d17698299310f8 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 4 Apr 2024 19:23:49 +0200 Subject: [PATCH] Fix effect dependencies (#1019) * Fix missing effect dependencies * Remove unnecessary effect dependency --- components/logger.js | 2 +- components/webln/nwc.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/logger.js b/components/logger.js index b64c6c00..da58f7b3 100644 --- a/components/logger.js +++ b/components/logger.js @@ -228,7 +228,7 @@ const WalletLoggerProvider = ({ children }) => { const log = { wallet, level, message, ts: +new Date() } saveLog(log) setLogs((prevLogs) => [...prevLogs, log]) - }, [setLogs, saveLog]) + }, [saveLog]) return ( diff --git a/components/webln/nwc.js b/components/webln/nwc.js index e012fd24..205762da 100644 --- a/components/webln/nwc.js +++ b/components/webln/nwc.js @@ -131,7 +131,7 @@ export function NWCProvider ({ children }) { } finally { setInitialized(true) } - }, [logger]) + }, [validateParams, logger]) const saveConfig = useCallback(async (config) => { // immediately store config so it's not lost even if config is invalid @@ -252,7 +252,7 @@ export function NWCProvider ({ children }) { // relay?.close() if (relay) logger.info(`closed connection to ${relayUrl}`) } - }, [walletPubkey, secret, logger]) + }, [walletPubkey, relayUrl, secret, logger]) useEffect(() => { loadConfig().catch(err => logger.error(err.message || err.toString?.()))