send payment try catch

This commit is contained in:
hatim boufnichel 2020-08-27 20:06:57 +02:00
parent d1734a01c0
commit f6f681c0a1

View file

@ -1507,6 +1507,7 @@ module.exports = async (
})
}
try {
if (keysend) {
const { dest, amt, finalCltvDelta = 40 } = req.body
if (!dest || !amt) {
@ -1537,6 +1538,10 @@ module.exports = async (
})
return res.status(200).json(payment)
} catch (e) {
logger.error(e)
return res.status(500).json({ errorMessage: e })
}
})
app.post('/api/lnd/trackpayment', (req, res) => {