diff --git a/BTCPayServer/BTCPayNetworkProvider.Polis.cs b/BTCPayServer/BTCPayNetworkProvider.Polis.cs new file mode 100644 index 000000000..7dc0e9303 --- /dev/null +++ b/BTCPayServer/BTCPayNetworkProvider.Polis.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using BTCPayServer.Services.Rates; +using NBitcoin; +using NBXplorer; + +namespace BTCPayServer +{ + public partial class BTCPayNetworkProvider + { + public void InitPolis() + { + NBitcoin.Altcoins.Polis.EnsureRegistered(); + + var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("POLIS"); + Add(new BTCPayNetwork() + { + CryptoCode = nbxplorerNetwork.CryptoCode, + BlockExplorerLink = NBXplorerNetworkProvider.ChainType == ChainType.Main ? "https://insight.polispay.org/tx/{0}" : "https://insight.polispay.org/tx/f{0}", + NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork, + NBXplorerNetwork = nbxplorerNetwork, + UriScheme = "polis", + DefaultRateProvider = new CoinAverageRateProviderDescription("POLIS"), + CryptoImagePath = "imlegacy/polis.png", + DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NBXplorerNetworkProvider.ChainType), + CoinType = NBXplorerNetworkProvider.ChainType == ChainType.Main ? new KeyPath("2'") : new KeyPath("1'") + }); + } + } +} diff --git a/BTCPayServer/BTCPayNetworkProvider.cs b/BTCPayServer/BTCPayNetworkProvider.cs index faef1e19f..523eebd84 100644 --- a/BTCPayServer/BTCPayNetworkProvider.cs +++ b/BTCPayServer/BTCPayNetworkProvider.cs @@ -48,6 +48,7 @@ namespace BTCPayServer InitBitcoin(); InitLitecoin(); InitDogecoin(); + InitPolis(); } /// diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index 767120e1e..301d507c4 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -35,25 +35,26 @@ - - - + - - - + + + + + + + - diff --git a/BTCPayServer/wwwroot/imlegacy/polis.png b/BTCPayServer/wwwroot/imlegacy/polis.png new file mode 100644 index 000000000..0ae0ca7c1 Binary files /dev/null and b/BTCPayServer/wwwroot/imlegacy/polis.png differ diff --git a/Nuget.Config b/Nuget.Config index d3e37fa44..02ac9d1e9 100644 --- a/Nuget.Config +++ b/Nuget.Config @@ -5,4 +5,4 @@ - \ No newline at end of file +