diff options
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/lightning/invoice.js | 3 | ||||
| -rw-r--r-- | routes/lightning/receive.js | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index 3ef0e109..94aac768 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -8,7 +8,6 @@ export default async (req, res) => { if (!tip) tip = 0; let value = amount + tip; - console.log("getting invoice"); try { if (config.lna.clightning) { if (!memo) memo = "coinos"; @@ -20,13 +19,11 @@ export default async (req, res) => { ); res.send({ text: invoice.bolt11 }); } else { - console.log("creating invoice"); const invoice = await createInvoice({ lnd, tokens: value, description: memo }); - console.log("created"); res.send({ text: invoice.request }); } } catch (e) { diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index 8141e5d3..3ecc4ce9 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -12,7 +12,7 @@ import { l, err, warn } from "$lib/logging"; const handlePayment = async msg => { try { - l("incoming lightning payment", msg.tokens, msg.request.substr(0,20)); + l("incoming lightning payment", msg.received, msg.request.substr(0,20)); if (!msg.secret) return; let account, total, user; @@ -28,7 +28,7 @@ const handlePayment = async msg => { await db.transaction(async transaction => { const { text: hash, currency, memo, rate, tip, user_id } = invoice; - const amount = parseInt(msg.tokens) - tip; + const amount = parseInt(msg.received) - tip; if (amount < 0) throw new Error("amount out of range"); account = await db.Account.findOne({ |
