From 64d605b6594dbb2782fac25a554586a1cf138cc9 Mon Sep 17 00:00:00 2001 From: "Dr. Tobias Baur" Date: Fri, 10 Mar 2023 10:23:00 +0100 Subject: [PATCH] Added possibility to simply forward address to an exisiting one --- db.go | 9 ++++++--- grab.html | 3 +++ index.html | 17 +++++++++++++++++ lnurl.go | 5 +++++ nostr.go | 9 ++++++--- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/db.go b/db.go index 7cac36c..18fb0a3 100644 --- a/db.go +++ b/db.go @@ -65,9 +65,12 @@ func SaveName( params.Name = name params.Domain = domain - // check if the given data works - if inv, err = makeInvoice(params, 1000, &pin, "", ""); err != nil { - return "", "", fmt.Errorf("couldn't make an invoice with the given data: %w", err) + if params.Kind != "forward" { + // check if the given data works + if inv, err = makeInvoice(params, 1000, &pin, "", ""); err != nil { + return "", "", fmt.Errorf("couldn't make an invoice with the given data: %w", err) + } + } // save it diff --git a/grab.html b/grab.html index 6adef28..63fafe9 100644 --- a/grab.html +++ b/grab.html @@ -23,13 +23,16 @@ +
To ensure the connection with your Lightning backend is configured properly, we've created a test invoice that can be seen below.
+
{{ invoice }}
+
Not working? Ask for help! diff --git a/index.html b/index.html index a661196..300c0d4 100644 --- a/index.html +++ b/index.html @@ -56,9 +56,26 @@ +
+ +
+
+ + +
+ +
+