diff options
| author | Adam Soltys <[email protected]> | 2024-09-17 06:50:06 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-17 06:50:06 +0000 |
| commit | 3a493d30daa964b8dcb0bf1c74df995d8dc9fa32 (patch) | |
| tree | 1431eb8a8ee85791a189fe578b87a1b0fb0073a0 /lib/payments.ts | |
| parent | f1cd8904fb7231d43f16b7bc27f45b8b31a03fde (diff) | |
| download | coinos-server-3a493d30daa964b8dcb0bf1c74df995d8dc9fa32.tar.gz coinos-server-3a493d30daa964b8dcb0bf1c74df995d8dc9fa32.zip | |
pass invoice for internal
Diffstat (limited to 'lib/payments.ts')
| -rw-r--r-- | lib/payments.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/payments.ts b/lib/payments.ts index 8f197044..66e725c7 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -12,7 +12,6 @@ import { fail, fiat, getInvoice, - getUser, sleep, SATS, sats, @@ -605,14 +604,14 @@ export let sendLightning = async ({ } }; -export let sendInternal = async ({ amount, recipient, sender }) => { - let inv = await generate({ +export let sendInternal = async ({ amount, invoice = undefined, recipient, sender }) => { + if (!invoice) invoice = await generate({ invoice: { amount, type: "lightning" }, user: recipient, sender, }); - let { hash } = inv; + let { hash } = invoice; let memo; let p = await debit({ hash, amount, memo, user: sender }); |
