mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-20 07:24:25 +01:00
[Greenfield] Fix: The route to connect to a peer lightning node was always crashing
This commit is contained in:
@@ -1675,6 +1675,9 @@ namespace BTCPayServer.Tests
|
|||||||
Assert.NotNull(info.InactiveChannelsCount);
|
Assert.NotNull(info.InactiveChannelsCount);
|
||||||
Assert.NotNull(info.PendingChannelsCount);
|
Assert.NotNull(info.PendingChannelsCount);
|
||||||
|
|
||||||
|
var gex = await AssertAPIError("lightning-node-unavailable", () => chargeClient.ConnectToLightningNode("BTC", new ConnectToNodeRequest(NodeInfo.Parse($"{new Key().PubKey.ToHex()}@localhost:3827"))));
|
||||||
|
Assert.Contains("NotSupported", gex.Message);
|
||||||
|
|
||||||
await AssertAPIError("lightning-node-unavailable", () => chargeClient.GetLightningNodeChannels("BTC"));
|
await AssertAPIError("lightning-node-unavailable", () => chargeClient.GetLightningNodeChannels("BTC"));
|
||||||
// Not permission for the store!
|
// Not permission for the store!
|
||||||
await AssertAPIError("missing-permission", () => chargeClient.GetLightningNodeChannels(user.StoreId, "BTC"));
|
await AssertAPIError("missing-permission", () => chargeClient.GetLightningNodeChannels(user.StoreId, "BTC"));
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
||||||
<Import Project="../Build/Common.csproj" />
|
<Import Project="../Build/Common.csproj" />
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BIP78.Sender" Version="0.2.2" />
|
<PackageReference Include="BIP78.Sender" Version="0.2.2" />
|
||||||
<PackageReference Include="BTCPayServer.Hwi" Version="2.0.2" />
|
<PackageReference Include="BTCPayServer.Hwi" Version="2.0.2" />
|
||||||
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.4.6" />
|
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.4.7" />
|
||||||
<PackageReference Include="CsvHelper" Version="15.0.5" />
|
<PackageReference Include="CsvHelper" Version="15.0.5" />
|
||||||
<PackageReference Include="Dapper" Version="2.0.123" />
|
<PackageReference Include="Dapper" Version="2.0.123" />
|
||||||
<PackageReference Include="Fido2" Version="2.0.2" />
|
<PackageReference Include="Fido2" Version="2.0.2" />
|
||||||
|
|||||||
@@ -448,6 +448,7 @@ namespace BTCPayServer.Hosting
|
|||||||
|
|
||||||
services.AddSingleton<IObjectModelValidator, SkippableObjectValidatorProvider>();
|
services.AddSingleton<IObjectModelValidator, SkippableObjectValidatorProvider>();
|
||||||
services.SkipModelValidation<RootedKeyPath>();
|
services.SkipModelValidation<RootedKeyPath>();
|
||||||
|
services.SkipModelValidation<NodeInfo>();
|
||||||
|
|
||||||
if (configuration.GetOrDefault<bool>("cheatmode", false))
|
if (configuration.GetOrDefault<bool>("cheatmode", false))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user