aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning/query.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/lightning/query.js')
-rw-r--r--routes/lightning/query.js28
1 files changed, 0 insertions, 28 deletions
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);
- }
-};