From 1d541fd97210389f006e65d46ab783afbe82cea8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 26 Feb 2025 11:59:58 -0800 Subject: payment types --- routes/ecash.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'routes/ecash.ts') diff --git a/routes/ecash.ts b/routes/ecash.ts index e5039aa4..e4898358 100644 --- a/routes/ecash.ts +++ b/routes/ecash.ts @@ -1,12 +1,14 @@ import { db, g, s } from "$lib/db"; import { check, claim, get, mint } from "$lib/ecash"; import { err, l } from "$lib/logging"; -import { credit, debit, types } from "$lib/payments"; +import { credit, debit } from "$lib/payments"; import { emit } from "$lib/sockets"; import { bail, fail } from "$lib/utils"; import { getEncodedToken } from "@cashu/cashu-ts"; import { v4 } from "uuid"; -const { ecash: type } = types; + +import { PaymentType } from "$lib/types"; +const { ecash: type } = PaymentType; Error.stackTraceLimit = 100; // Set this to the desired limit @@ -97,7 +99,7 @@ export default { try { amount = Math.round(amount / 1000); const ref = preimage; - const { lightning: type } = types; + const { lightning: type } = PaymentType; if (user.username !== "mint") fail("unauthorized"); const { id: uid, currency } = user; const ourfee = await db.debit( -- cgit v1.2.3