diff options
| author | Adam Soltys <[email protected]> | 2022-10-19 19:50:09 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-19 19:50:09 +0000 |
| commit | 889f93bb24d9c1357b15b477e5a5b4d2bc4dcb20 (patch) | |
| tree | 903fa6fea1fc92996a9b35f306052d8d031a929e | |
| parent | 924a5c33f3b9c76fcdb4a5787130e04bc56fd2bf (diff) | |
| download | coinos-server-889f93bb24d9c1357b15b477e5a5b4d2bc4dcb20.tar.gz coinos-server-889f93bb24d9c1357b15b477e5a5b4d2bc4dcb20.zip | |
uuid invoice label
| -rw-r--r-- | prod.yml | 2 | ||||
| -rw-r--r-- | routes/lightning/invoice.js | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -23,6 +23,8 @@ services: PUBLIC_COINOS_URL: "${PUBLIC_COINOS_URL}" PUBLIC_BTC: "${PUBLIC_BTC}" PUBLIC_SOCKET: "${PUBLIC_SOCKET}" + STRIPE: "${STRIPE}" + LAUNCH: "${LAUNCH}" app: depends_on: - cl diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index 94961b35..a97697a8 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -3,6 +3,7 @@ import { createInvoice } from "lightning"; import { err } from "$lib/logging"; import lnd from "$lib/lnd"; import ln from "$lib/ln"; +import { v4 } from "uuid"; export default async (req, res) => { let { amount, memo, tip } = req.body; @@ -14,7 +15,7 @@ export default async (req, res) => { if (!memo) memo = "coinos"; const invoice = await ln.invoice( value ? `${value}sat` : "any", - new Date(), + v4(), memo, 360 ); |
