From d6465162bdc094db3dbbba7d368f6ca5ba96db27 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Tue, 13 Feb 2024 21:30:54 +0100 Subject: [PATCH] Fix missing setInitialized (#815) Payment methods were not marked as initialized if the local storage item did not exist on page load. --- components/webln/lnbits.js | 1 + components/webln/nwc.js | 1 + 2 files changed, 2 insertions(+) diff --git a/components/webln/lnbits.js b/components/webln/lnbits.js index fd716a51..ced064cc 100644 --- a/components/webln/lnbits.js +++ b/components/webln/lnbits.js @@ -99,6 +99,7 @@ export function LNbitsProvider ({ children }) { const configStr = window.localStorage.getItem(storageKey) if (!configStr) { setEnabled(undefined) + setInitialized(true) return } diff --git a/components/webln/nwc.js b/components/webln/nwc.js index 0a617520..9443a7c5 100644 --- a/components/webln/nwc.js +++ b/components/webln/nwc.js @@ -21,6 +21,7 @@ export function NWCProvider ({ children }) { const configStr = window.localStorage.getItem(storageKey) if (!configStr) { setEnabled(undefined) + setInitialized(true) return }