mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-24 01:14:20 +01:00
Fix litecoin registration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user