aboutsummaryrefslogtreecommitdiffstats
path: root/routes/ecash.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-26 11:59:58 -0800
committerAdam Soltys <[email protected]>2025-02-26 11:59:58 -0800
commit1d541fd97210389f006e65d46ab783afbe82cea8 (patch)
tree66781ea2992fa99198ed1e450cdb9b68acfbc4d9 /routes/ecash.ts
parenta14b987a392bc700975b048f37838da08e4ed255 (diff)
downloadcoinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.tar.gz
coinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.zip
payment types
Diffstat (limited to 'routes/ecash.ts')
-rw-r--r--routes/ecash.ts8
1 files changed, 5 insertions, 3 deletions
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(