From bce1345cccc8397c3b00b7b5b3344cd5c3ee5fd7 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 30 Jul 2020 22:06:54 +0900 Subject: [PATCH] Add BTCPayServerEnvironment.Altcoins --- BTCPayServer/Services/BTCPayServerEnvironment.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/BTCPayServer/Services/BTCPayServerEnvironment.cs b/BTCPayServer/Services/BTCPayServerEnvironment.cs index 8cf1100d7..eb625133c 100644 --- a/BTCPayServer/Services/BTCPayServerEnvironment.cs +++ b/BTCPayServer/Services/BTCPayServerEnvironment.cs @@ -22,6 +22,12 @@ namespace BTCPayServer.Services #else Build = "Release"; #endif +#if ALTCOINS + AltcoinsVersion = true; +#else + AltcoinsVersion = false; +#endif + Environment = env; NetworkType = provider.NetworkType; this.torServices = torServices; @@ -46,6 +52,7 @@ namespace BTCPayServer.Services { get; set; } + public bool AltcoinsVersion { get; set; } public bool IsDevelopping { @@ -72,9 +79,8 @@ namespace BTCPayServer.Services { StringBuilder txt = new StringBuilder(); txt.Append($"@Copyright BTCPayServer v{Version}"); -#if ALTCOINS - txt.Append($" (altcoins)"); -#endif + if (AltcoinsVersion) + txt.Append($" (altcoins)"); if (!Environment.IsProduction() || !Build.Equals("Release", StringComparison.OrdinalIgnoreCase)) { txt.Append($" Environment: {Environment.EnvironmentName} Build: {Build}");