diff options
| author | Adam Soltys <[email protected]> | 2025-03-05 13:35:31 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-03-05 15:06:48 -0800 |
| commit | bbdae13248476e9ff49fcefc64cf8c8e97b5f679 (patch) | |
| tree | cb3696e680f7417f5988375043341e495b7cad3d /routes/ecash.ts | |
| parent | 118386e0691a0c80a0d8c19ab40bd3abf6859b84 (diff) | |
| download | coinos-server-bbdae13248476e9ff49fcefc64cf8c8e97b5f679.tar.gz coinos-server-bbdae13248476e9ff49fcefc64cf8c8e97b5f679.zip | |
use getInvoice helper
Diffstat (limited to 'routes/ecash.ts')
| -rw-r--r-- | routes/ecash.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/ecash.ts b/routes/ecash.ts index e4898358..25b7a255 100644 --- a/routes/ecash.ts +++ b/routes/ecash.ts @@ -3,7 +3,7 @@ import { check, claim, get, mint } from "$lib/ecash"; import { err, l } from "$lib/logging"; import { credit, debit } from "$lib/payments"; import { emit } from "$lib/sockets"; -import { bail, fail } from "$lib/utils"; +import { bail, fail, getInvoice } from "$lib/utils"; import { getEncodedToken } from "@cashu/cashu-ts"; import { v4 } from "uuid"; @@ -147,7 +147,7 @@ export default { async receive(req, res) { try { const { id, proofs, mint, memo } = req.body; - const { uid: ref } = await g(`invoice:${id}`); + const { uid: ref } = await getInvoice(id); const amount = await claim( getEncodedToken({ |
