diff --git a/src/App.svelte b/src/App.svelte index 1560d70..bb70d0a 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -84,7 +84,11 @@ amount.toFixed(2))+payway.currency.toLowerCase()+"-"):"" if (account[0]=='+') account=account.slice(1) - return prefix + account + "@" + payway.id + ".lnurl-pay.me" + if (window.location.hostname.endsWith(".onion")) { + return prefix + account + "." + payway.id + "@" + window.location.hostname + } else { + return prefix + account + "@" + payway.id + "." + window.location.hostname + } } function genLNURL(payway,account,amount,memo,isEncrypted) { @@ -100,7 +104,8 @@ if (memo) { params.set("m",toHexString(UTF8.setBytesFromString(memo))) } - return lnurlEncode("https://lnurl-pay.me/pay?"+params.toString()).toUpperCase() + const me = window.location.protocol + "//" + window.location.host + return lnurlEncode(me + "/pay?" + params.toString()).toUpperCase() }