diff --git a/BTCPayServer/BTCPayNetworkProvider.Viacoin.cs b/BTCPayServer/BTCPayNetworkProvider.Viacoin.cs new file mode 100644 index 000000000..20116e188 --- /dev/null +++ b/BTCPayServer/BTCPayNetworkProvider.Viacoin.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 InitViacoin() + { + var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("VIA"); + Add(new BTCPayNetwork() + { + CryptoCode = nbxplorerNetwork.CryptoCode, + BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://explorer.viacoin.org/tx/{0}" : "https://explorer.viacoin.org/tx/{0}", + NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork, + NBXplorerNetwork = nbxplorerNetwork, + UriScheme = "viacoin", + DefaultRateRules = new[] + { + "VIA_X = VIA_BTC * BTC_X", + "VIA_BTC = bittrex(VIA_BTC)" + }, + CryptoImagePath = "imlegacy/viacoin.png", + DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType), + CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("14'") : new KeyPath("1'") + }); + } + } +} diff --git a/BTCPayServer/BTCPayNetworkProvider.cs b/BTCPayServer/BTCPayNetworkProvider.cs index 5a1c997ce..32568233b 100644 --- a/BTCPayServer/BTCPayNetworkProvider.cs +++ b/BTCPayServer/BTCPayNetworkProvider.cs @@ -53,6 +53,7 @@ namespace BTCPayServer InitPolis(); InitFeathercoin(); InitUfo(); + InitViacoin(); } /// diff --git a/BTCPayServer/wwwroot/imlegacy/viacoin.png b/BTCPayServer/wwwroot/imlegacy/viacoin.png new file mode 100644 index 000000000..457b48a26 Binary files /dev/null and b/BTCPayServer/wwwroot/imlegacy/viacoin.png differ diff --git a/BTCPayServer/wwwroot/imlegacy/viacoin.svg b/BTCPayServer/wwwroot/imlegacy/viacoin.svg new file mode 100644 index 000000000..5c0f4d57e --- /dev/null +++ b/BTCPayServer/wwwroot/imlegacy/viacoin.svg @@ -0,0 +1,23 @@ + + + + + + + +