diff options
| author | Adam Soltys <[email protected]> | 2025-02-26 11:59:58 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-02-26 11:59:58 -0800 |
| commit | 1d541fd97210389f006e65d46ab783afbe82cea8 (patch) | |
| tree | 66781ea2992fa99198ed1e450cdb9b68acfbc4d9 /routes/ecash.ts | |
| parent | a14b987a392bc700975b048f37838da08e4ed255 (diff) | |
| download | coinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.tar.gz coinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.zip | |
payment types
Diffstat (limited to 'routes/ecash.ts')
| -rw-r--r-- | routes/ecash.ts | 8 |
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( |
