From 4ace7e07c9827d3ecd290333fe69ede58d3ab0f7 Mon Sep 17 00:00:00 2001 From: Kukks Date: Tue, 4 Aug 2020 07:25:15 +0200 Subject: [PATCH] fix chain loader after unfiltered removed --- BTCPayServer.Common/Altcoins/Liquid/LiquidExtensions.cs | 4 ++-- BTCPayServer/Configuration/BTCPayServerOptions.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BTCPayServer.Common/Altcoins/Liquid/LiquidExtensions.cs b/BTCPayServer.Common/Altcoins/Liquid/LiquidExtensions.cs index c6c23b4b4..d0248ba7e 100644 --- a/BTCPayServer.Common/Altcoins/Liquid/LiquidExtensions.cs +++ b/BTCPayServer.Common/Altcoins/Liquid/LiquidExtensions.cs @@ -6,11 +6,11 @@ namespace BTCPayServer { public static class LiquidExtensions { - public static IEnumerable GetAllElementsSubChains(this BTCPayNetworkProvider networkProvider) + public static IEnumerable GetAllElementsSubChains(this BTCPayNetworkProvider networkProvider, BTCPayNetworkProvider unfilteredNetworkProvider) { var elementsBased = networkProvider.GetAll().OfType(); var parentChains = elementsBased.Select(network => network.NetworkCryptoCode.ToUpperInvariant()).Distinct(); - return networkProvider.GetAll().OfType() + return unfilteredNetworkProvider.GetAll().OfType() .Where(network => parentChains.Contains(network.NetworkCryptoCode)).Select(network => network.CryptoCode.ToUpperInvariant()); } } diff --git a/BTCPayServer/Configuration/BTCPayServerOptions.cs b/BTCPayServer/Configuration/BTCPayServerOptions.cs index 3cd189a7b..9e94cce2b 100644 --- a/BTCPayServer/Configuration/BTCPayServerOptions.cs +++ b/BTCPayServer/Configuration/BTCPayServerOptions.cs @@ -92,7 +92,7 @@ namespace BTCPayServer.Configuration var networkProvider = new BTCPayNetworkProvider(NetworkType); var filtered = networkProvider.Filter(supportedChains.ToArray()); #if ALTCOINS - supportedChains.AddRange(filtered.GetAllElementsSubChains()); + supportedChains.AddRange(filtered.GetAllElementsSubChains(networkProvider)); #endif #if !ALTCOINS var onlyBTC = supportedChains.Count == 1 && supportedChains.First() == "BTC";