mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
34 lines
1.3 KiB
C#
34 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 InitDogecoin()
|
|
{
|
|
NBitcoin.Altcoins.Dogecoin.EnsureRegistered();
|
|
var ltcRate = new CoinAverageRateProvider("DOGE");
|
|
|
|
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("DOGE");
|
|
Add(new BTCPayNetwork()
|
|
{
|
|
CryptoCode = nbxplorerNetwork.CryptoCode,
|
|
BlockExplorerLink = NBXplorerNetworkProvider.ChainType == ChainType.Main ? "https://dogechain.info/tx/{0}" : "https://dogechain.info/tx/{0}",
|
|
NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork,
|
|
NBXplorerNetwork = nbxplorerNetwork,
|
|
UriScheme = "dogecoin",
|
|
DefaultRateProvider = ltcRate,
|
|
CryptoImagePath = "imlegacy/dogecoin.png",
|
|
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NBXplorerNetworkProvider.ChainType),
|
|
CoinType = NBXplorerNetworkProvider.ChainType == ChainType.Main ? new KeyPath("3'") : new KeyPath("1'")
|
|
});
|
|
}
|
|
}
|
|
}
|