Merge pull request #1782 from xpayserver/btc-only

Add Bitcoin Only Build
This commit is contained in:
Nicolas Dorier
2020-07-29 21:58:28 +09:00
committed by GitHub
58 changed files with 1886 additions and 1160 deletions

View File

@@ -45,6 +45,7 @@ namespace BTCPayServer
_NBXplorerNetworkProvider = new NBXplorerNetworkProvider(networkType);
NetworkType = networkType;
InitBitcoin();
#if ALTCOINS
InitLiquid();
InitLiquidAssets();
InitLitecoin();
@@ -80,6 +81,7 @@ namespace BTCPayServer
// Disabled because of https://twitter.com/Cryptopia_NZ/status/1085084168852291586
//InitBitcoinplus();
//InitUfo();
#endif
}
/// <summary>

View File

@@ -1,3 +1,4 @@
#if ALTCOINS
using NBitcoin;
using NBitcoin.Altcoins;
using NBitcoin.Altcoins.Elements;
@@ -34,3 +35,4 @@ namespace BTCPayServer
}
#endif

View File

@@ -1,3 +1,4 @@
#if ALTCOINS
using NBitcoin;
namespace BTCPayServer
@@ -81,3 +82,4 @@ namespace BTCPayServer
}
#endif

View File

@@ -1,3 +1,4 @@
#if ALTCOINS
using System.Collections.Generic;
using System.Linq;
using NBitcoin;
@@ -58,3 +59,4 @@ namespace BTCPayServer
}
}
}
#endif

View File

@@ -0,0 +1,18 @@
#if ALTCOINS
using System.Collections.Generic;
using System.Linq;
namespace BTCPayServer
{
public static class LiquidExtensions
{
public static IEnumerable<string> GetAllElementsSubChains(this BTCPayNetworkProvider networkProvider)
{
var elementsBased = networkProvider.GetAll().OfType<ElementsBTCPayNetwork>();
var parentChains = elementsBased.Select(network => network.NetworkCryptoCode.ToUpperInvariant()).Distinct();
return networkProvider.UnfilteredNetworks.GetAll().OfType<ElementsBTCPayNetwork>()
.Where(network => parentChains.Contains(network.NetworkCryptoCode)).Select(network => network.CryptoCode.ToUpperInvariant());
}
}
}
#endif

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
<Import Project="../Build/Common.csproj" />