diff options
| author | John Barratt <[email protected]> | 2022-12-19 16:30:28 -0800 |
|---|---|---|
| committer | John Barratt <[email protected]> | 2022-12-19 16:30:28 -0800 |
| commit | c7c079b3f832e220a12c0c4e91ec8a2167ec21db (patch) | |
| tree | 1d166956d304b415188c284533bb410b83aaff77 | |
| parent | 8dfc0c5e4dee7d885466cfdd26040f04302c3075 (diff) | |
| download | coinos-server-c7c079b3f832e220a12c0c4e91ec8a2167ec21db.tar.gz coinos-server-c7c079b3f832e220a12c0c4e91ec8a2167ec21db.zip | |
conversion route for lightning invoices
| -rw-r--r-- | routes/assets.js | 1 | ||||
| -rw-r--r-- | routes/invoices.js | 3 | ||||
| -rw-r--r-- | 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 |
