diff options
| author | Adam Soltys <[email protected]> | 2025-09-18 15:01:06 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-09-18 15:01:06 -0700 |
| commit | 0ce3367bedf79c7b93009489963de7609336a965 (patch) | |
| tree | cd6f959f521d602aded37f632fab8b587989681e /src/lib/parse.ts | |
| parent | 8ce8e2ed32cd8e9f8137c5b05e716c51822d1b3c (diff) | |
| download | coinos-ui-0ce3367bedf79c7b93009489963de7609336a965.tar.gz coinos-ui-0ce3367bedf79c7b93009489963de7609336a965.zip | |
pass cookies to parse
Diffstat (limited to 'src/lib/parse.ts')
| -rw-r--r-- | src/lib/parse.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/parse.ts b/src/lib/parse.ts index e350c1ab..6ff4556c 100644 --- a/src/lib/parse.ts +++ b/src/lib/parse.ts @@ -1,10 +1,10 @@ import { PUBLIC_DOMAIN } from "$env/static/public"; import { decode } from "$lib/bip21"; -import { get, isLiquid, post, sats } from "$lib/utils"; +import { auth, get, isLiquid, post, sats } from "$lib/utils"; import { redirect } from "@sveltejs/kit"; import { validate } from "bitcoin-address-validation"; -export default async (s, host) => { +export default async (s, host, cookies) => { if (!s) return; let t = s.trim(); let amount; @@ -59,7 +59,7 @@ export default async (s, host) => { if (t.includes(":")) t = t.split(":")[1]; if (t.toLowerCase().startsWith("lnr")) { - const { iid } = await post("/sendinvoice", { invstring: t }); + const { iid } = await post("/sendinvoice", { invreq: t }, auth(cookies)); invoice = { id: iid }; } else if (t.toLowerCase().startsWith("ln")) { try { |
