Fix missing logger.error and setStatus (#1122)
This commit is contained in:
parent
bd37ec17cc
commit
84b4d98c5c
|
@ -136,6 +136,7 @@ export function LNbitsProvider ({ children }) {
|
|||
logger.ok('wallet enabled')
|
||||
} catch (err) {
|
||||
logger.error('invalid config:', err)
|
||||
setStatus(Status.Error)
|
||||
logger.info('wallet disabled')
|
||||
throw err
|
||||
}
|
||||
|
|
|
@ -145,8 +145,8 @@ export function LNCProvider ({ children }) {
|
|||
setStatus(Status.Enabled)
|
||||
logger.ok('wallet enabled')
|
||||
} catch (err) {
|
||||
setStatus(Status.Error)
|
||||
logger.error('invalid config:', err)
|
||||
setStatus(Status.Error)
|
||||
logger.info('wallet disabled')
|
||||
throw err
|
||||
} finally {
|
||||
|
@ -181,8 +181,8 @@ export function LNCProvider ({ children }) {
|
|||
setConfig({ pairingPhrase: lnc.credentials.pairingPhrase, password: lnc.credentials.password })
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error('wallet could not be loaded:', err)
|
||||
setStatus(Status.Error)
|
||||
logger.error('wallet could not be loaded', err)
|
||||
}
|
||||
})()
|
||||
}, [setStatus, setConfig, logger])
|
||||
|
|
|
@ -124,6 +124,8 @@ export function NWCProvider ({ children }) {
|
|||
setStatus(Status.Enabled)
|
||||
logger.ok('wallet enabled')
|
||||
} catch (err) {
|
||||
logger.error('invalid config:', err)
|
||||
setStatus(Status.Error)
|
||||
logger.info('wallet disabled')
|
||||
throw err
|
||||
}
|
||||
|
@ -158,6 +160,7 @@ export function NWCProvider ({ children }) {
|
|||
setStatus(Status.Enabled)
|
||||
logger.ok('wallet enabled')
|
||||
} catch (err) {
|
||||
logger.error('invalid config:', err)
|
||||
setStatus(Status.Error)
|
||||
logger.info('wallet disabled')
|
||||
throw err
|
||||
|
|
Loading…
Reference in New Issue