2018-05-11 10:26:08 -05:00
|
|
|
using System;
|
2018-04-17 11:13:50 -05:00
|
|
|
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,
|
2018-07-16 23:25:28 -05:00
|
|
|
DisplayName = "Polis",
|
2018-05-11 10:46:49 -05:00
|
|
|
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://insight.polispay.org/tx/{0}" : "https://insight.polispay.org/tx/{0}",
|
2018-04-17 11:13:50 -05:00
|
|
|
NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork,
|
|
|
|
NBXplorerNetwork = nbxplorerNetwork,
|
|
|
|
UriScheme = "polis",
|
2018-05-11 10:26:08 -05:00
|
|
|
DefaultRateRules = new[]
|
|
|
|
{
|
|
|
|
"POLIS_X = POLIS_BTC * BTC_X",
|
|
|
|
"POLIS_BTC = cryptopia(POLIS_BTC)"
|
|
|
|
},
|
2018-04-17 11:13:50 -05:00
|
|
|
CryptoImagePath = "imlegacy/polis.png",
|
2018-05-11 10:26:08 -05:00
|
|
|
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
|
2018-05-14 10:04:12 -05:00
|
|
|
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1997'") : new KeyPath("1'")
|
2018-04-17 11:13:50 -05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|