diff --git a/BTCPayServer/BTCPayNetworkProvider.Polis.cs b/BTCPayServer/BTCPayNetworkProvider.Polis.cs new file mode 100644 index 000000000..69640dab1 --- /dev/null +++ b/BTCPayServer/BTCPayNetworkProvider.Polis.cs @@ -0,0 +1,34 @@ +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() + { + var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("POLIS"); + Add(new BTCPayNetwork() + { + CryptoCode = nbxplorerNetwork.CryptoCode, + BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://insight.polispay.org/tx/{0}" : "https://insight.polispay.org/tx/{0}", + NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork, + NBXplorerNetwork = nbxplorerNetwork, + UriScheme = "polis", + DefaultRateRules = new[] + { + "POLIS_X = POLIS_BTC * BTC_X", + "POLIS_BTC = cryptopia(POLIS_BTC)" + }, + CryptoImagePath = "imlegacy/polis.png", + DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType), + CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1997'") : new KeyPath("1'") + }); + } + } +} diff --git a/BTCPayServer/BTCPayNetworkProvider.cs b/BTCPayServer/BTCPayNetworkProvider.cs index 1aadb7bc3..aec5a9d18 100644 --- a/BTCPayServer/BTCPayNetworkProvider.cs +++ b/BTCPayServer/BTCPayNetworkProvider.cs @@ -50,6 +50,7 @@ namespace BTCPayServer InitDogecoin(); InitBitcoinGold(); InitMonacoin(); + InitPolis(); } /// 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 +