Open jaonoctus opened 3 years ago
Since,
if (process.env.TOR_URL) {
host = process.env.TOR_URL;
}
const url = 'bluewallet:setlndhuburl?url=' + encodeURIComponent(req.protocol + '://' + host);
A workaround is to set TOR_URL
environment variable to ${BTCPAY_HOST}/bluewallet_lndhub_app
@maltokyo thoughts?
Thanks. Good find. I'll try to fix on the weekend.
Another topic, but important to note: I think this /bluewallet_lndhub_app
should be customizable somehow.
If I know some btcpayserver URL, I can try this lndhub endpoint and get the node exactly balance (from the public channels, at least). And possibly flood with invoices creation. Also end with the inbound-liquidity (not smart, but it is possible)
Been working on fixing this (the URL being wrong in QR code) on BTCPay side, but I have no clue how to manage that. Anyone have some advice?
@rockstardev @Kukks would you have some advice? For people who use the QR code, I guess it is quite critical. But I can not work that out without requesting LNDHub team to make the change on their side..
cc: @Overtorment
try this patch:
diff --git a/controllers/website.js b/controllers/website.js
index 7785937..d9af611 100644
--- a/controllers/website.js
+++ b/controllers/website.js
@@ -98,7 +98,8 @@ router.get('/qr', function (req, res) {
if (process.env.TOR_URL) {
host = process.env.TOR_URL;
}
- const url = 'bluewallet:setlndhuburl?url=' + encodeURIComponent(req.protocol + '://' + host);
+ const customPath = req.url.replace('/qr/', '');
+ const url = 'bluewallet:setlndhuburl?url=' + encodeURIComponent(req.protocol + '://' + host + customPath);
var code = qr.image(url, { type: 'png' });
res.setHeader('Content-type', 'image/png');
code.pipe(res);
if it works for you I will include it in next release
The Connection QR Code is wrong.
Expected behavior
The QR Code content should be
https://btcpayserverurl/bluewallet_lndhub_app/
Actual behavior
The QR Code content is
https://btcpayserverurl/
Steps to Reproduce
opt-add-bluewallet-lndhub
fragment.https://btcpayserverurl/bluewallet_lndhub_app
.Settings > Network > Lightning Settings
.Versions