Can set derivation scheme for a specific crypto currency

This commit is contained in:
nicolas.dorier
2018-01-08 22:45:09 +09:00
parent 5910644cda
commit c3d37b1f78
8 changed files with 384 additions and 180 deletions

View File

@@ -37,6 +37,16 @@ namespace BTCPayServer
return GetExplorerClient(network.CryptoCode);
}
public BTCPayNetwork GetNetwork(string cryptoCode)
{
var network = _NetworkProviders.GetNetwork(cryptoCode);
if (network == null)
return null;
if (_Options.ExplorerFactories.ContainsKey(network.CryptoCode))
return network;
return null;
}
public IEnumerable<(BTCPayNetwork, ExplorerClient)> GetAll()
{
foreach(var net in _NetworkProviders.GetAll())