aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-09-18 14:41:25 -0700
committerAdam Soltys <[email protected]>2025-09-18 14:41:25 -0700
commit8ce8e2ed32cd8e9f8137c5b05e716c51822d1b3c (patch)
tree6d771b2d0586b05f267d93c61cdb9d6d964adfca /src
parent17eab850084bc4ac47ebdc4b293beb983ab11df7 (diff)
downloadcoinos-ui-8ce8e2ed32cd8e9f8137c5b05e716c51822d1b3c.tar.gz
coinos-ui-8ce8e2ed32cd8e9f8137c5b05e716c51822d1b3c.zip
sendinvoice support
Diffstat (limited to 'src')
-rw-r--r--src/lib/parse.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/parse.ts b/src/lib/parse.ts
index 9c18504a..e350c1ab 100644
--- a/src/lib/parse.ts
+++ b/src/lib/parse.ts
@@ -58,7 +58,10 @@ export default async (s, host) => {
if (t.toLowerCase().startsWith("lnurl")) redirect(307, `/ln/${t}`);
if (t.includes(":")) t = t.split(":")[1];
- if (t.toLowerCase().startsWith("ln")) {
+ if (t.toLowerCase().startsWith("lnr")) {
+ const { iid } = await post("/sendinvoice", { invstring: t });
+ invoice = { id: iid };
+ } else if (t.toLowerCase().startsWith("ln")) {
try {
invoice = await get(`/invoice/${t}`);
if (invoice.user.username === "mint") throw new Error("mint payment");