Fix missing setInitialized (#815)
Payment methods were not marked as initialized if the local storage item did not exist on page load.
This commit is contained in:
parent
ec4e1b5da7
commit
d6465162bd
|
@ -99,6 +99,7 @@ export function LNbitsProvider ({ children }) {
|
||||||
const configStr = window.localStorage.getItem(storageKey)
|
const configStr = window.localStorage.getItem(storageKey)
|
||||||
if (!configStr) {
|
if (!configStr) {
|
||||||
setEnabled(undefined)
|
setEnabled(undefined)
|
||||||
|
setInitialized(true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ export function NWCProvider ({ children }) {
|
||||||
const configStr = window.localStorage.getItem(storageKey)
|
const configStr = window.localStorage.getItem(storageKey)
|
||||||
if (!configStr) {
|
if (!configStr) {
|
||||||
setEnabled(undefined)
|
setEnabled(undefined)
|
||||||
|
setInitialized(true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue