diff --git a/BTCPayServer/Configuration/ExternalConnectionString.cs b/BTCPayServer/Configuration/ExternalConnectionString.cs index b9bdc9c8f..819483355 100644 --- a/BTCPayServer/Configuration/ExternalConnectionString.cs +++ b/BTCPayServer/Configuration/ExternalConnectionString.cs @@ -77,7 +77,8 @@ namespace BTCPayServer.Configuration } } - if (new[] { ExternalServiceTypes.Charge, ExternalServiceTypes.RTL, ExternalServiceTypes.ThunderHub, ExternalServiceTypes.Spark, ExternalServiceTypes.Configurator }.Contains(serviceType)) + if (new[] { ExternalServiceTypes.Charge, ExternalServiceTypes.RTL, ExternalServiceTypes.ThunderHub, + ExternalServiceTypes.Spark, ExternalServiceTypes.Configurator, ExternalServiceTypes.Torq }.Contains(serviceType)) { // Read access key from cookie file if (connectionString.CookieFilePath != null) @@ -97,7 +98,8 @@ namespace BTCPayServer.Configuration } connectionString.CookieFilePath = null; - if (serviceType == ExternalServiceTypes.RTL || serviceType == ExternalServiceTypes.Configurator || serviceType == ExternalServiceTypes.ThunderHub) + if (serviceType == ExternalServiceTypes.RTL || serviceType == ExternalServiceTypes.Configurator || + serviceType == ExternalServiceTypes.ThunderHub || serviceType == ExternalServiceTypes.Torq) { connectionString.AccessKey = cookieFileContent; } diff --git a/BTCPayServer/Configuration/ExternalService.cs b/BTCPayServer/Configuration/ExternalService.cs index 0d8078408..4c3e19cae 100644 --- a/BTCPayServer/Configuration/ExternalService.cs +++ b/BTCPayServer/Configuration/ExternalService.cs @@ -36,6 +36,10 @@ namespace BTCPayServer.Configuration $"Valid example: 'server=https://btcpay.example.com/rtl/btc/;cookiefile=/etc/clightning_bitcoin_rtl/.cookie'" + Environment.NewLine + "Error: {1}", "Ride The Lightning"); + Load(configuration, cryptoCode, "torq", ExternalServiceTypes.Torq, "Invalid setting {0}, " + Environment.NewLine + + $"Valid example: 'server=https://btcpay.example.com/torq/cookie-login/;cookiefile=/etc/lnd_bitcoin_rtl/.cookie'" + Environment.NewLine + + "Error: {1}", + "Torq"); Load(configuration, cryptoCode, "thunderhub", ExternalServiceTypes.ThunderHub, "Invalid setting {0}, " + Environment.NewLine + $"Valid example: 'server=https://btcpay.example.com/thub/;cookiefile=/etc/clightning_bitcoin_rtl/.cookie'" + Environment.NewLine + "Error: {1}", @@ -93,7 +97,8 @@ namespace BTCPayServer.Configuration { ExternalServiceTypes.Spark, ExternalServiceTypes.RTL, - ExternalServiceTypes.ThunderHub + ExternalServiceTypes.ThunderHub, + ExternalServiceTypes.Torq }; public static readonly string[] LightningServiceNames = @@ -130,6 +135,7 @@ namespace BTCPayServer.Configuration P2P, RPC, Configurator, - CLightningRest + CLightningRest, + Torq } } diff --git a/BTCPayServer/Controllers/UIServerController.cs b/BTCPayServer/Controllers/UIServerController.cs index b24d5e834..8a9cfaa37 100644 --- a/BTCPayServer/Controllers/UIServerController.cs +++ b/BTCPayServer/Controllers/UIServerController.cs @@ -512,6 +512,7 @@ namespace BTCPayServer.Controllers case ExternalServiceTypes.RTL: case ExternalServiceTypes.ThunderHub: case ExternalServiceTypes.Spark: + case ExternalServiceTypes.Torq: if (connectionString.AccessKey == null) { TempData[WellKnownTempData.ErrorMessage] = $"The access key of the service is not set"; diff --git a/BTCPayServer/Properties/launchSettings.json b/BTCPayServer/Properties/launchSettings.json index 56175aed6..deabba81b 100644 --- a/BTCPayServer/Properties/launchSettings.json +++ b/BTCPayServer/Properties/launchSettings.json @@ -13,6 +13,7 @@ "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_BTCEXTERNALTORQ": "server=/torq/cookie-login;cookiefile=fake", "BTCPAY_EXTERNALSERVICES": "totoservice:totolink;Lightning Terminal:/lit/;", "BTCPAY_BTCEXPLORERURL": "http://127.0.0.1:32838/", "BTCPAY_ALLOW-ADMIN-REGISTRATION": "true", @@ -48,6 +49,7 @@ "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_BTCEXTERNALTORQ": "server=/torq/cookie-login;cookiefile=fake", "BTCPAY_EXTERNALSERVICES": "totoservice:totolink;Lightning Terminal:/lit/;", "BTCPAY_EXTERNALCONFIGURATOR": "passwordfile=testpwd;server=/configurator", "BTCPAY_BTCEXPLORERURL": "http://127.0.0.1:32838/", @@ -86,6 +88,7 @@ "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_BTCEXTERNALTORQ": "server=/torq/cookie-login;cookiefile=fake", "BTCPAY_EXTERNALSERVICES": "totoservice:totolink;Lightning Terminal:/lit/;", "BTCPAY_EXTERNALCONFIGURATOR": "passwordfile=testpwd;server=/configurator", "BTCPAY_BTCEXPLORERURL": "http://127.0.0.1:32838/", diff --git a/BTCPayServer/wwwroot/img/torq.png b/BTCPayServer/wwwroot/img/torq.png new file mode 100644 index 000000000..703c58fd4 Binary files /dev/null and b/BTCPayServer/wwwroot/img/torq.png differ