Variables to the top
This commit is contained in:
parent
8d1df5e1b2
commit
1b726e452a
1 changed files with 2 additions and 1 deletions
|
|
@ -893,6 +893,7 @@ module.exports = async (
|
||||||
const { password, alias, accessSecret } = req.body
|
const { password, alias, accessSecret } = req.body
|
||||||
const healthResponse = await checkHealth()
|
const healthResponse = await checkHealth()
|
||||||
const exists = await walletExists()
|
const exists = await walletExists()
|
||||||
|
const allowUnlockedLND = process.env.ALLOW_UNLOCKED_LND === 'true'
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
return res.status(500).json({
|
return res.status(500).json({
|
||||||
field: 'wallet',
|
field: 'wallet',
|
||||||
|
|
@ -924,7 +925,7 @@ module.exports = async (
|
||||||
|
|
||||||
if (
|
if (
|
||||||
healthResponse.LNDStatus.service !== 'walletUnlocker' &&
|
healthResponse.LNDStatus.service !== 'walletUnlocker' &&
|
||||||
process.env.ALLOW_UNLOCKED_LND !== 'true'
|
!allowUnlockedLND
|
||||||
) {
|
) {
|
||||||
return res.status(400).json({
|
return res.status(400).json({
|
||||||
field: 'wallet',
|
field: 'wallet',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue