diff options
| author | Adam Soltys <[email protected]> | 2024-12-13 12:36:13 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-13 12:36:13 -0800 |
| commit | e88dc11d821fc363dd7305e3ebca34db1927988e (patch) | |
| tree | d8bb94c0afcc796551c4c9cb6f3f44ac32d506de | |
| parent | 80f753e981e5e32087f7b18345459c52c4ef5a25 (diff) | |
| download | coinos-server-e88dc11d821fc363dd7305e3ebca34db1927988e.tar.gz coinos-server-e88dc11d821fc363dd7305e3ebca34db1927988e.zip | |
keysend accept extratlvs
| -rw-r--r-- | lib/nwc.ts | 3 | ||||
| -rw-r--r-- | lib/payments.ts | 2 | ||||
| -rw-r--r-- | routes/users.ts | 2 |
3 files changed, 6 insertions, 1 deletions
@@ -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, |
