From da71103e42741beac42a2a10d322b05ef93a85e0 Mon Sep 17 00:00:00 2001 From: keyan Date: Sat, 27 Apr 2024 18:30:03 -0500 Subject: [PATCH] clear lnc state on detach --- components/webln/lnc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/webln/lnc.js b/components/webln/lnc.js index cf114b60..570de017 100644 --- a/components/webln/lnc.js +++ b/components/webln/lnc.js @@ -94,7 +94,6 @@ export function LNCProvider ({ children }) { const saveConfig = useCallback(async config => { setConfig(config) - console.log(config) try { lnc.credentials.pairingPhrase = config.pairingPhrase lnc.credentials.password = config?.password || XXX_DEFAULT_PASSWORD @@ -117,6 +116,7 @@ export function LNCProvider ({ children }) { await lnc.credentials.clear(false) if (lnc.isConnected) lnc.disconnect() setStatus(undefined) + setConfig({}) logger.info('cleared config') }, [logger, lnc])