Fix effect dependencies (#1019)
* Fix missing effect dependencies * Remove unnecessary effect dependency
This commit is contained in:
parent
32ea514286
commit
6e75b9d274
|
@ -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}>
|
||||
|
|
|
@ -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?.()))
|
||||
|
|
Loading…
Reference in New Issue