fix bug happening if only btc is supported

This commit is contained in:
nicolas.dorier 2018-02-17 01:55:38 +09:00
parent 9d406923ae
commit 0602353dd2
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<Version>1.0.1.32</Version>
<Version>1.0.1.33</Version>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@ -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));
}
}