mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
Added Dash support for BTCPayServer
This commit is contained in:
parent
b04d70f141
commit
a3ae694048
4 changed files with 38 additions and 0 deletions
|
@ -18,6 +18,7 @@ namespace BTCPayServer.Tests
|
||||||
builder.AppendLine("// Some cool comments");
|
builder.AppendLine("// Some cool comments");
|
||||||
builder.AppendLine("DOGE_X = DOGE_BTC * BTC_X * 1.1");
|
builder.AppendLine("DOGE_X = DOGE_BTC * BTC_X * 1.1");
|
||||||
builder.AppendLine("DOGE_BTC = Bittrex(DOGE_BTC)");
|
builder.AppendLine("DOGE_BTC = Bittrex(DOGE_BTC)");
|
||||||
|
builder.AppendLine("DASH_BTC = Bittrex(DASH_BTC)");
|
||||||
builder.AppendLine("// Some other cool comments");
|
builder.AppendLine("// Some other cool comments");
|
||||||
builder.AppendLine("BTC_usd = GDax(BTC_USD)");
|
builder.AppendLine("BTC_usd = GDax(BTC_USD)");
|
||||||
builder.AppendLine("BTC_X = Coinbase(BTC_X);");
|
builder.AppendLine("BTC_X = Coinbase(BTC_X);");
|
||||||
|
@ -29,6 +30,7 @@ namespace BTCPayServer.Tests
|
||||||
"// Some cool comments\n" +
|
"// Some cool comments\n" +
|
||||||
"DOGE_X = DOGE_BTC * BTC_X * 1.1;\n" +
|
"DOGE_X = DOGE_BTC * BTC_X * 1.1;\n" +
|
||||||
"DOGE_BTC = bittrex(DOGE_BTC);\n" +
|
"DOGE_BTC = bittrex(DOGE_BTC);\n" +
|
||||||
|
"DASH_BTC = bittrex(DASH_BTC);\n" +
|
||||||
"// Some other cool comments\n" +
|
"// Some other cool comments\n" +
|
||||||
"BTC_USD = gdax(BTC_USD);\n" +
|
"BTC_USD = gdax(BTC_USD);\n" +
|
||||||
"BTC_X = coinbase(BTC_X);\n" +
|
"BTC_X = coinbase(BTC_X);\n" +
|
||||||
|
|
35
BTCPayServer/BTCPayNetworkProvider.Dash.cs
Normal file
35
BTCPayServer/BTCPayNetworkProvider.Dash.cs
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
using NBitcoin;
|
||||||
|
|
||||||
|
namespace BTCPayServer
|
||||||
|
{
|
||||||
|
public partial class BTCPayNetworkProvider
|
||||||
|
{
|
||||||
|
public void InitDash()
|
||||||
|
{
|
||||||
|
//not needed: NBitcoin.Altcoins.Dash.Instance.EnsureRegistered();
|
||||||
|
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("DASH");
|
||||||
|
Add(new BTCPayNetwork()
|
||||||
|
{
|
||||||
|
CryptoCode = nbxplorerNetwork.CryptoCode,
|
||||||
|
DisplayName = "Dash",
|
||||||
|
BlockExplorerLink = NetworkType == NetworkType.Mainnet
|
||||||
|
? "https://insight.dash.org/insight/tx/{0}"
|
||||||
|
: "https://testnet-insight.dashevo.org/insight/tx/{0}",
|
||||||
|
NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork,
|
||||||
|
NBXplorerNetwork = nbxplorerNetwork,
|
||||||
|
UriScheme = "dash",
|
||||||
|
DefaultRateRules = new[]
|
||||||
|
{
|
||||||
|
"DASH_X = DASH_BTC * BTC_X",
|
||||||
|
"DASH_BTC = bittrex(DASH_BTC)"
|
||||||
|
},
|
||||||
|
CryptoImagePath = "imlegacy/dash.png",
|
||||||
|
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
|
||||||
|
//https://github.com/satoshilabs/slips/blob/master/slip-0044.md
|
||||||
|
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("5'")
|
||||||
|
: new KeyPath("1'"),
|
||||||
|
MinFee = Money.Satoshis(1m)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,6 +50,7 @@ namespace BTCPayServer
|
||||||
InitDogecoin();
|
InitDogecoin();
|
||||||
InitBitcoinGold();
|
InitBitcoinGold();
|
||||||
InitMonacoin();
|
InitMonacoin();
|
||||||
|
InitDash();
|
||||||
InitPolis();
|
InitPolis();
|
||||||
InitFeathercoin();
|
InitFeathercoin();
|
||||||
InitGroestlcoin();
|
InitGroestlcoin();
|
||||||
|
|
BIN
BTCPayServer/wwwroot/imlegacy/dash.png
Normal file
BIN
BTCPayServer/wwwroot/imlegacy/dash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Loading…
Add table
Reference in a new issue