From 0602353dd2bf90fa77c1e6487a9a9e1a8e6d52ce Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 17 Feb 2018 01:55:38 +0900 Subject: [PATCH] fix bug happening if only btc is supported --- BTCPayServer/BTCPayServer.csproj | 2 +- BTCPayServer/Services/Wallets/BTCPayWalletProvider.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index f95c606ed..4ff7bc3e0 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -2,7 +2,7 @@ Exe netcoreapp2.0 - 1.0.1.32 + 1.0.1.33 NU1701 diff --git a/BTCPayServer/Services/Wallets/BTCPayWalletProvider.cs b/BTCPayServer/Services/Wallets/BTCPayWalletProvider.cs index b51bb7683..1bdd0f05d 100644 --- a/BTCPayServer/Services/Wallets/BTCPayWalletProvider.cs +++ b/BTCPayServer/Services/Wallets/BTCPayWalletProvider.cs @@ -24,7 +24,10 @@ namespace BTCPayServer.Services.Wallets foreach(var network in networkProvider.GetAll()) { - _Wallets.Add(network.CryptoCode, new BTCPayWallet(_Client.GetExplorerClient(network.CryptoCode), new MemoryCache(_Options), network)); + var explorerClient = _Client.GetExplorerClient(network.CryptoCode); + if (explorerClient == null) + continue; + _Wallets.Add(network.CryptoCode, new BTCPayWallet(explorerClient, new MemoryCache(_Options), network)); } }