Remove old access code stuff

This commit is contained in:
Daniel Lugo 2021-12-27 14:52:27 -04:00
parent 9c698a38e0
commit 8d1df5e1b2

View file

@ -921,15 +921,10 @@ module.exports = async (
"Please specify a password that's longer than 8 characters" "Please specify a password that's longer than 8 characters"
}) })
} }
let secretUsed = null
if (accessSecret) {
secretUsed = await Storage.get(
`UnlockedAccessSecrets/${accessSecret}`
)
}
if ( if (
healthResponse.LNDStatus.service !== 'walletUnlocker' && healthResponse.LNDStatus.service !== 'walletUnlocker' &&
(process.env.ALLOW_UNLOCKED_LND !== 'true' || secretUsed !== false) process.env.ALLOW_UNLOCKED_LND !== 'true'
) { ) {
return res.status(400).json({ return res.status(400).json({
field: 'wallet', field: 'wallet',
@ -937,9 +932,6 @@ module.exports = async (
'Wallet is already unlocked. Please restart your LND instance and try again.' 'Wallet is already unlocked. Please restart your LND instance and try again.'
}) })
} }
if (secretUsed === false) {
await Storage.setItem(`UnlockedAccessSecrets/${accessSecret}`, true)
}
try { try {
if (healthResponse.LNDStatus.service === 'walletUnlocker') { if (healthResponse.LNDStatus.service === 'walletUnlocker') {