aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-13 12:36:13 -0800
committerAdam Soltys <[email protected]>2024-12-13 12:36:13 -0800
commite88dc11d821fc363dd7305e3ebca34db1927988e (patch)
treed8bb94c0afcc796551c4c9cb6f3f44ac32d506de
parent80f753e981e5e32087f7b18345459c52c4ef5a25 (diff)
downloadcoinos-server-e88dc11d821fc363dd7305e3ebca34db1927988e.tar.gz
coinos-server-e88dc11d821fc363dd7305e3ebca34db1927988e.zip
keysend accept extratlvs
-rw-r--r--lib/nwc.ts3
-rw-r--r--lib/payments.ts2
-rw-r--r--routes/users.ts2
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/nwc.ts b/lib/nwc.ts
index 8961e8b0..626c7ed0 100644
--- a/lib/nwc.ts
+++ b/lib/nwc.ts
@@ -142,7 +142,7 @@ const handle = (method, params, user, ev) =>
},
async pay_keysend() {
- const { amount, pubkey } = params;
+ const { amount, pubkey, tlv_records: extratlvs } = params;
try {
const { payment_hash } = await sendKeysend({
@@ -150,6 +150,7 @@ const handle = (method, params, user, ev) =>
amount,
pubkey,
user,
+ extratlvs,
});
for (let i = 0; i < 10; i++) {
diff --git a/lib/payments.ts b/lib/payments.ts
index 93afc9ea..af838758 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -422,6 +422,7 @@ export const sendKeysend = async ({
fee = undefined,
memo = undefined,
user,
+ extratlvs = undefined,
}) => {
fee = Math.max(parseInt(fee || amount * 0.005), 5);
@@ -442,6 +443,7 @@ export const sendKeysend = async ({
amount_msat: amount * 1000,
maxfee: fee * 1000,
retry_for: 10,
+ extratlvs,
});
if (r.status !== "complete") reverse(p);
diff --git a/routes/users.ts b/routes/users.ts
index 6abfa47d..8a11b662 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -560,6 +560,8 @@ export default {
const link = `${process.env.URL}/verify/${code}`;
const subject = "Email Verification";
+ l("verifying email", user.username, email);
+
await mail(user, subject, templates.verifyEmail, {
username,
link,