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 /lib/lightning.ts | |
| parent | a14b987a392bc700975b048f37838da08e4ed255 (diff) | |
| download | coinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.tar.gz coinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.zip | |
payment types
Diffstat (limited to 'lib/lightning.ts')
| -rw-r--r-- | lib/lightning.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/lightning.ts b/lib/lightning.ts index f63b57be..4d41d9eb 100644 --- a/lib/lightning.ts +++ b/lib/lightning.ts @@ -2,8 +2,9 @@ import { db, g, s } from "$lib/db"; import ln from "$lib/ln"; import { err, warn } from "$lib/logging"; import { handleZap } from "$lib/nostr"; -import { credit, types } from "$lib/payments"; +import { credit } from "$lib/payments"; import { getPayment, getUser } from "$lib/utils"; +import { PaymentType } from "$lib/types"; export async function listenForLightning() { const inv = await ln.waitanyinvoice((await g("pay_index")) || 0); @@ -49,7 +50,7 @@ export async function listenForLightning() { amount: received, memo: invoice.memo, ref: preimage, - type: bolt12 ? types.bolt12 : types.lightning, + type: bolt12 ? PaymentType.bolt12 : PaymentType.lightning, }); } catch (e) { console.log(e); @@ -97,7 +98,7 @@ export async function replay(index) { amount: received, memo: invoice.memo, ref: preimage, - type: bolt12 ? types.bolt12 : types.lightning, + type: bolt12 ? PaymentType.bolt12 : PaymentType.lightning, }); } catch (e) { console.log(e); |
