diff options
| author | Adam Soltys <[email protected]> | 2024-11-22 22:42:35 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-22 22:42:35 -0800 |
| commit | b82f045fe567f25c7d0a9fbb5163853373cd616c (patch) | |
| tree | 0630fc14b88c740992bf04be5bfcd4fb4334f129 /lib/invoices.ts | |
| parent | 41ff5eb1261ad0878b080b5a85f6553223108429 (diff) | |
| download | coinos-server-b82f045fe567f25c7d0a9fbb5163853373cd616c.tar.gz coinos-server-b82f045fe567f25c7d0a9fbb5163853373cd616c.zip | |
ecash receive
Diffstat (limited to 'lib/invoices.ts')
| -rw-r--r-- | lib/invoices.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/invoices.ts b/lib/invoices.ts index 30ae8402..5e59fd83 100644 --- a/lib/invoices.ts +++ b/lib/invoices.ts @@ -1,5 +1,6 @@ import config from "$config"; import { db, g, s } from "$lib/db"; +import { request } from "$lib/ecash"; import ln from "$lib/ln"; import { types } from "$lib/payments"; import { emit } from "$lib/sockets"; @@ -101,6 +102,9 @@ export const generate = async ({ invoice, user }) => { text = bip21(hash, invoice); } else if (type === types.internal) { hash = id; + } else if (type === types.ecash) { + hash = id; + text = request(id, amount, memo); } else { fail(`unrecognized type ${type}`); } |
