aboutsummaryrefslogtreecommitdiffstats
path: root/lib/send.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/send.js')
-rw-r--r--lib/send.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/send.js b/lib/send.js
index 293473d9..e08e9033 100644
--- a/lib/send.js
+++ b/lib/send.js
@@ -2,6 +2,8 @@ const bolt11 = require("bolt11");
const { Op } = require("sequelize");
send = async (amount, memo, hash, user) => {
+ l.info("attempting lightning payment", user.username, amount, hash);
+
let payreq = bolt11.decode(hash);
let routingInfo = payreq.tags.find(t => t.tagName === "routing_info");
if (
@@ -59,7 +61,7 @@ send = async (amount, memo, hash, user) => {
fee_limit: { fixed: Math.min(10000, account.balance) },
});
- if (!m) throw new Error("lightning payment failed");
+ if (!m) throw new Error(`lightning payment failed ${amount} ${hash}`);
if (m.payment_error) throw new Error(m.payment_error);
({