From 47aa48402a0d34dd8ab11f0f315393fcc4f5c61b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 7 May 2020 20:15:56 -0700 Subject: c-lightning support --- routes/lightning/query.js | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 routes/lightning/query.js (limited to 'routes/lightning/query.js') diff --git a/routes/lightning/query.js b/routes/lightning/query.js deleted file mode 100644 index 6e70f30a..00000000 --- a/routes/lightning/query.js +++ /dev/null @@ -1,28 +0,0 @@ -const bolt11 = require("bolt11"); - -module.exports = async (req, res) => { - let { amount, payreq } = req.body; - - try { - let invoice = await db.Invoice.findOne({ - where: { text: payreq }, - include: { - model: db.User, - as: "user" - } - }); - - if (invoice) emit(req.user.username, "to", invoice.user); - - payreq = bolt11.decode(payreq); - - res.send( - await lna.queryRoutes({ - pub_key: payreq.payeeNodeKey, - amt: amount || payreq.satoshis - }) - ); - } catch (e) { - res.status(500).send(e.message); - } -}; -- cgit v1.2.3