From dba4eb24727d81ad8ab47d622b6f5b73810c557b Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 24 Jan 2024 16:41:03 +0530 Subject: [PATCH 1/2] chore: use internal url for getalby --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 03559cd..cf96abe 100644 --- a/main.go +++ b/main.go @@ -71,6 +71,13 @@ func ToUrl(identifier string) (string, string, string, error) { lnurlpUrl := fmt.Sprintf("https://%s/.well-known/lnurlp/%s", parts[1], parts[0]) nostrUrl := fmt.Sprintf("https://%s/.well-known/nostr.json?name=%s", parts[1], parts[0]) + urlPrefix := "https://getalby.com" + replacement := "http://alby-mainnet-getalbycom" + + keysendUrl = strings.Replace(keysendUrl, urlPrefix, replacement, 1) + lnurlpUrl = strings.Replace(lnurlpUrl, urlPrefix, replacement, 1) + nostrUrl = strings.Replace(nostrUrl, urlPrefix, replacement, 1) + return lnurlpUrl, keysendUrl, nostrUrl, nil } From c41b73dda9c39e88c6389de9242de339b0dc5b2e Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 24 Jan 2024 17:07:25 +0530 Subject: [PATCH 2/2] chore: indentation --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index cf96abe..b7aca16 100644 --- a/main.go +++ b/main.go @@ -71,12 +71,12 @@ func ToUrl(identifier string) (string, string, string, error) { lnurlpUrl := fmt.Sprintf("https://%s/.well-known/lnurlp/%s", parts[1], parts[0]) nostrUrl := fmt.Sprintf("https://%s/.well-known/nostr.json?name=%s", parts[1], parts[0]) - urlPrefix := "https://getalby.com" - replacement := "http://alby-mainnet-getalbycom" + urlPrefix := "https://getalby.com" + replacement := "http://alby-mainnet-getalbycom" - keysendUrl = strings.Replace(keysendUrl, urlPrefix, replacement, 1) - lnurlpUrl = strings.Replace(lnurlpUrl, urlPrefix, replacement, 1) - nostrUrl = strings.Replace(nostrUrl, urlPrefix, replacement, 1) + keysendUrl = strings.Replace(keysendUrl, urlPrefix, replacement, 1) + lnurlpUrl = strings.Replace(lnurlpUrl, urlPrefix, replacement, 1) + nostrUrl = strings.Replace(nostrUrl, urlPrefix, replacement, 1) return lnurlpUrl, keysendUrl, nostrUrl, nil }