aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-13 10:10:10 -0700
committerAdam Soltys <[email protected]>2022-09-13 10:10:10 -0700
commit1752bb585d3cc00c7bd57dee9ba7b84d945d79de (patch)
treef68cbfe5741b96c17ad9c8818656b6ed7f581876 /routes
parent75c2cd0391158aeaf9d0f9b4f0e56edc825bf667 (diff)
parentf62d5b5c6233510576df0e934d422395b9957833 (diff)
downloadcoinos-server-1752bb585d3cc00c7bd57dee9ba7b84d945d79de.tar.gz
coinos-server-1752bb585d3cc00c7bd57dee9ba7b84d945d79de.zip
Merge branch 'prod'
Diffstat (limited to 'routes')
-rw-r--r--routes/lightning/receive.js2
-rw-r--r--routes/lnurl.js4
2 files changed, 5 insertions, 1 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js
index 3ecc4ce9..0e241dbd 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.received, msg.request.substr(0,20));
+ l("incoming lightning payment", msg.received);
if (!msg.secret) return;
let account, total, user;
diff --git a/routes/lnurl.js b/routes/lnurl.js
index a0d2a6d0..6eab008a 100644
--- a/routes/lnurl.js
+++ b/routes/lnurl.js
@@ -22,6 +22,8 @@ import {
conversionFeeReceiver
} from "./lightning/conversionFee.js";
+import send from "$lib/send";
+
const logins = persist("data/logins.json");
const recipients = persist("data/recipients.json");
const lnurlPayments = persist("data/payments.json");
@@ -196,6 +198,7 @@ app.post("/pay", auth, async (req, res, next) => {
if (recipients[secret]) {
url = `${req.protocol}://${req.get("host")}/api/send`;
+ console.log(url);
const { data } = await axios.post(
url,
{
@@ -216,6 +219,7 @@ app.post("/pay", auth, async (req, res, next) => {
res.send(await send(amount, "", data.pr, user));
}
} catch (e) {
+ console.log(e);
err("failed to send payment", e.message);
res.code(500).send(e.message);
}