Fixing typo

This commit is contained in:
rockstardev
2020-07-30 20:43:44 -05:00
parent dc3c130162
commit 1b3e40fd70
8 changed files with 9 additions and 8 deletions

View File

@@ -626,7 +626,7 @@ namespace BTCPayServer.Controllers
private bool CanLoginOrRegister() private bool CanLoginOrRegister()
{ {
return _btcPayServerEnvironment.IsDevelopping || _btcPayServerEnvironment.IsSecure; return _btcPayServerEnvironment.IsDeveloping || _btcPayServerEnvironment.IsSecure;
} }
private void SetInsecureFlags() private void SetInsecureFlags()

View File

@@ -288,7 +288,7 @@ namespace BTCPayServer.Controllers.GreenField
protected bool CanUseInternalLightning(bool doingAdminThings) protected bool CanUseInternalLightning(bool doingAdminThings)
{ {
return (_btcPayServerEnvironment.IsDevelopping || User.IsInRole(Roles.ServerAdmin) || return (_btcPayServerEnvironment.IsDeveloping || User.IsInRole(Roles.ServerAdmin) ||
(_cssThemeManager.AllowLightningInternalNodeForAll && !doingAdminThings)); (_cssThemeManager.AllowLightningInternalNodeForAll && !doingAdminThings));
} }

View File

@@ -172,7 +172,7 @@ namespace BTCPayServer.Controllers
private bool CanUseInternalLightning() private bool CanUseInternalLightning()
{ {
return (_BTCPayEnv.IsDevelopping || User.IsInRole(Roles.ServerAdmin) || _CssThemeManager.AllowLightningInternalNodeForAll); return (_BTCPayEnv.IsDeveloping || User.IsInRole(Roles.ServerAdmin) || _CssThemeManager.AllowLightningInternalNodeForAll);
} }
} }
} }

View File

@@ -33,7 +33,7 @@ namespace BTCPayServer.HostedServices
protected async Task CheckForNewVersion() protected async Task CheckForNewVersion()
{ {
var policies = await _settingsRepository.GetSettingAsync<PoliciesSettings>() ?? new PoliciesSettings(); var policies = await _settingsRepository.GetSettingAsync<PoliciesSettings>() ?? new PoliciesSettings();
if (policies.CheckForNewVersions && !_env.IsDevelopping) if (policies.CheckForNewVersions && !_env.IsDeveloping)
{ {
var tag = await _versionFetcher.Fetch(Cancellation); var tag = await _versionFetcher.Fetch(Cancellation);
if (tag != null && tag != _env.Version) if (tag != null && tag != _env.Version)

View File

@@ -240,6 +240,7 @@ namespace BTCPayServer.Hosting
services.AddScoped<IAuthorizationHandler, CookieAuthorizationHandler>(); services.AddScoped<IAuthorizationHandler, CookieAuthorizationHandler>();
services.AddScoped<IAuthorizationHandler, BitpayAuthorizationHandler>(); services.AddScoped<IAuthorizationHandler, BitpayAuthorizationHandler>();
services.AddSingleton<IVersionFetcher, GithubVersionFetcher>();
services.AddSingleton<IHostedService, NewVersionCheckerHostedService>(); services.AddSingleton<IHostedService, NewVersionCheckerHostedService>();
services.AddSingleton<INotificationHandler, NewVersionNotification.Handler>(); services.AddSingleton<INotificationHandler, NewVersionNotification.Handler>();
@@ -287,7 +288,7 @@ namespace BTCPayServer.Hosting
{ {
var btcPayEnv = provider.GetService<BTCPayServerEnvironment>(); var btcPayEnv = provider.GetService<BTCPayServerEnvironment>();
var rateLimits = new RateLimitService(); var rateLimits = new RateLimitService();
if (btcPayEnv.IsDevelopping) if (btcPayEnv.IsDeveloping)
{ {
rateLimits.SetZone($"zone={ZoneLimits.Login} rate=1000r/min burst=100 nodelay"); rateLimits.SetZone($"zone={ZoneLimits.Login} rate=1000r/min burst=100 nodelay");
rateLimits.SetZone($"zone={ZoneLimits.Register} rate=1000r/min burst=100 nodelay"); rateLimits.SetZone($"zone={ZoneLimits.Register} rate=1000r/min burst=100 nodelay");

View File

@@ -502,7 +502,7 @@ namespace BTCPayServer.Payments.PayJoin
{ {
var o = new JObject(); var o = new JObject();
o.Add(new JProperty("errorCode", PayjoinReceiverHelper.GetErrorCode(error))); o.Add(new JProperty("errorCode", PayjoinReceiverHelper.GetErrorCode(error)));
if (string.IsNullOrEmpty(debug) || !_env.IsDevelopping) if (string.IsNullOrEmpty(debug) || !_env.IsDeveloping)
{ {
o.Add(new JProperty("message", PayjoinReceiverHelper.GetMessage(error))); o.Add(new JProperty("message", PayjoinReceiverHelper.GetMessage(error)));
} }

View File

@@ -64,7 +64,7 @@ namespace BTCPayServer.Services.Altcoins.Monero.Services
await daemonRpcClient.SendCommandAsync<JsonRpcClient.NoRequestModel, SyncInfoResponse>("sync_info", await daemonRpcClient.SendCommandAsync<JsonRpcClient.NoRequestModel, SyncInfoResponse>("sync_info",
JsonRpcClient.NoRequestModel.Instance); JsonRpcClient.NoRequestModel.Instance);
summary.TargetHeight = daemonResult.TargetHeight ?? daemonResult.Height; summary.TargetHeight = daemonResult.TargetHeight ?? daemonResult.Height;
summary.Synced = daemonResult.Height >= summary.TargetHeight && (summary.TargetHeight > 0 || _btcPayServerEnvironment.IsDevelopping); summary.Synced = daemonResult.Height >= summary.TargetHeight && (summary.TargetHeight > 0 || _btcPayServerEnvironment.IsDeveloping);
summary.CurrentHeight = daemonResult.Height; summary.CurrentHeight = daemonResult.Height;
summary.UpdatedAt = DateTime.Now; summary.UpdatedAt = DateTime.Now;
summary.DaemonAvailable = true; summary.DaemonAvailable = true;

View File

@@ -54,7 +54,7 @@ namespace BTCPayServer.Services
} }
public bool AltcoinsVersion { get; set; } public bool AltcoinsVersion { get; set; }
public bool IsDevelopping public bool IsDeveloping
{ {
get get
{ {