From bbdae13248476e9ff49fcefc64cf8c8e97b5f679 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 5 Mar 2025 13:35:31 -0800 Subject: use getInvoice helper --- routes/ecash.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routes/ecash.ts') 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({ -- cgit v1.2.3