mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
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,
|
|
DisplayName = "Polis",
|
|
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'")
|
|
});
|
|
}
|
|
}
|
|
}
|