Merge pull request #168 from shocknet/fix/payment-route
send payment try catch
This commit is contained in:
commit
2bc3ae50bc
1 changed files with 28 additions and 23 deletions
|
|
@ -1507,6 +1507,7 @@ module.exports = async (
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (keysend) {
|
if (keysend) {
|
||||||
const { dest, amt, finalCltvDelta = 40 } = req.body
|
const { dest, amt, finalCltvDelta = 40 } = req.body
|
||||||
if (!dest || !amt) {
|
if (!dest || !amt) {
|
||||||
|
|
@ -1537,6 +1538,10 @@ module.exports = async (
|
||||||
})
|
})
|
||||||
|
|
||||||
return res.status(200).json(payment)
|
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) => {
|
app.post('/api/lnd/trackpayment', (req, res) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue