Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightning: Link to services directly #3593

Merged
merged 3 commits into from
Apr 11, 2022

Conversation

dennisreimann
Copy link
Member

Closes #3552.

@dennisreimann dennisreimann added Enhancement Improvements to an existing feature UI / UX Front-end issues, for front-end designers labels Mar 31, 2022
Comment on lines -85 to +96
string cookieFileContent = null;
bool isFake = false;
try
{
cookieFileContent = await System.IO.File.ReadAllTextAsync(connectionString.CookieFilePath);
isFake = connectionString.CookieFilePath == "fake";
connectionString.CookieFilePath = null;
}
catch (Exception ex)
bool isFake = connectionString.CookieFilePath == "fake"; // Hacks for testing
string cookieFileContent = isFake ? "fake" : null;
if (!isFake)
{
throw new System.IO.FileNotFoundException("Cookie file path not found", ex);
try
{
cookieFileContent = await System.IO.File.ReadAllTextAsync(connectionString.CookieFilePath);
}
catch (Exception ex)
{
throw new System.IO.FileNotFoundException("Cookie file path not found", ex);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part skips the cookie file reading for the fake path. The Spark part below looked like this is ok, but it never reached that point, because there was always the FileNotFoundException being thrown.

Comment on lines +14 to +18
"BTCPAY_BTCEXTERNALSPARK": "server=/spark/btc/;cookiefile=fake",
"BTCPAY_BTCEXTERNALCHARGE": "server=https://127.0.0.1:53280/mycharge/btc/;cookiefilepath=fake",
"BTCPAY_BTCEXTERNALRTL": "server=/rtl/api/authenticate/cookie;cookiefile=fake",
"BTCPAY_BTCEXTERNALTHUNDERHUB": "server=/thub/sso;cookiefile=fake",
"BTCPAY_EXTERNALSERVICES": "totoservice:totolink;Lightning Terminal:/lit/;",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding these fake services for testing in dev mode.

Copy link
Contributor

@bolatovumar bolatovumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and it seems to be working as expected.

@dennisreimann dennisreimann added this to the 1.5.0 milestone Apr 5, 2022
@dennisreimann
Copy link
Member Author

Dead link check failure unrelated.

@NicolasDorier NicolasDorier merged commit e5174b4 into btcpayserver:master Apr 11, 2022
@dennisreimann dennisreimann deleted the ln-services branch April 18, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvements to an existing feature UI / UX Front-end issues, for front-end designers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the extra click here step when accessing lightning service.
3 participants