Fix effect dependencies (#1019)

* Fix missing effect dependencies

* Remove unnecessary effect dependency
This commit is contained in:
ekzyis 2024-04-04 19:23:49 +02:00 committed by GitHub
parent 32ea514286
commit 6e75b9d274
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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 (
<WalletLogsContext.Provider value={logs}>

View File

@ -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?.()))