From c7c079b3f832e220a12c0c4e91ec8a2167ec21db Mon Sep 17 00:00:00 2001 From: John Barratt Date: Mon, 19 Dec 2022 16:30:28 -0800 Subject: conversion route for lightning invoices --- routes/assets.js | 1 - routes/invoices.js | 3 +-- routes/lightning/invoice.js | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/routes/assets.js b/routes/assets.js index ed0d3036..2488e447 100644 --- a/routes/assets.js +++ b/routes/assets.js @@ -351,7 +351,6 @@ app.post("/assets", auth, async (req, res) => { address: token_address, network: "liquid" }, - { transaction } ); emit(recipient.username, "payment", token_payment); diff --git a/routes/invoices.js b/routes/invoices.js index 8dadb99a..dcdefda5 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -165,7 +165,7 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { store.addresses[invoice.unconfidential] = user.username; if (blindkey) await lq.importBlindingKey(invoice.address, blindkey); } - + console.log("INVOICE", invoice) if (request_id) { let request = await db.Request.findOne({ where: { id: request_id }, @@ -212,7 +212,6 @@ app.post( app.post("/conversion", async (req, res, next) => { let { invoice_id, text } = req.body; - console.log("HERE", invoice_id, text) let conversion = await db.Conversion.create({ invoice_id, text }); res.send(conversion); } diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index ae974120..af0303e2 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -11,7 +11,7 @@ export default async (req, res) => { try { if (!memo) memo = "coinos"; const invoice = await ln.invoice( - value ? `${value}sat` : "any", + value ? `${value}sat` : "ancpy", v4(), memo, 360 -- cgit v1.2.3