mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Fix litecoin registration
This commit is contained in:
parent
c3d37b1f78
commit
c513d6bd44
@ -8,6 +8,10 @@ namespace BTCPayServer
|
||||
{
|
||||
public class BTCPayNetworkProvider
|
||||
{
|
||||
static BTCPayNetworkProvider()
|
||||
{
|
||||
NBXplorer.Altcoins.Litecoin.Networks.EnsureRegistered();
|
||||
}
|
||||
Dictionary<string, BTCPayNetwork> _Networks = new Dictionary<string, BTCPayNetwork>();
|
||||
public BTCPayNetworkProvider(Network network)
|
||||
{
|
||||
@ -20,6 +24,13 @@ namespace BTCPayServer
|
||||
NBitcoinNetwork = Network.Main,
|
||||
UriScheme = "bitcoin",
|
||||
});
|
||||
Add(new BTCPayNetwork()
|
||||
{
|
||||
CryptoCode = "LTC",
|
||||
BlockExplorerLink = "https://live.blockcypher.com/ltc/tx/{0}/",
|
||||
NBitcoinNetwork = NBXplorer.Altcoins.Litecoin.Networks.Mainnet,
|
||||
UriScheme = "litecoin",
|
||||
});
|
||||
}
|
||||
|
||||
if (network == Network.TestNet)
|
||||
@ -31,6 +42,13 @@ namespace BTCPayServer
|
||||
NBitcoinNetwork = Network.TestNet,
|
||||
UriScheme = "bitcoin",
|
||||
});
|
||||
Add(new BTCPayNetwork()
|
||||
{
|
||||
CryptoCode = "LTC",
|
||||
BlockExplorerLink = "http://explorer.litecointools.com/tx/{0}",
|
||||
NBitcoinNetwork = NBXplorer.Altcoins.Litecoin.Networks.Testnet,
|
||||
UriScheme = "litecoin",
|
||||
});
|
||||
}
|
||||
|
||||
if (network == Network.RegTest)
|
||||
@ -42,10 +60,17 @@ namespace BTCPayServer
|
||||
NBitcoinNetwork = Network.RegTest,
|
||||
UriScheme = "bitcoin"
|
||||
});
|
||||
Add(new BTCPayNetwork()
|
||||
{
|
||||
CryptoCode = "LTC",
|
||||
BlockExplorerLink = "http://explorer.litecointools.com/tx/{0}",
|
||||
NBitcoinNetwork = NBXplorer.Altcoins.Litecoin.Networks.Regtest,
|
||||
UriScheme = "litecoin",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Should not be needed")]
|
||||
[Obsolete("To use only for legacy stuff")]
|
||||
public BTCPayNetwork BTC
|
||||
{
|
||||
get
|
||||
|
@ -24,7 +24,7 @@
|
||||
<PackageReference Include="NBitcoin" Version="4.0.0.51" />
|
||||
<PackageReference Include="NBitpayClient" Version="1.0.0.14" />
|
||||
<PackageReference Include="DBreeze" Version="1.87.0" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="1.0.0.24" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="1.0.0.25" />
|
||||
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.1" />
|
||||
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.2" />
|
||||
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="1.0.0.13" />
|
||||
|
Loading…
Reference in New Issue
Block a user