From e4f79f046aa82bfbd6d76c933aeba5a978916dd0 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 9 Oct 2024 13:13:10 +0900 Subject: [PATCH] Remove unused field from automated payout settings --- .../Models/LightningAutomatedPayoutSettings.cs | 1 - ...dStoreAutomatedLightningPayoutProcessorsController.cs | 2 -- .../Lightning/LightningAutomatedPayoutBlob.cs | 1 - .../UILightningAutomatedPayoutProcessorsController.cs | 5 +---- .../Configure.cshtml | 9 --------- 5 files changed, 1 insertion(+), 17 deletions(-) diff --git a/BTCPayServer.Client/Models/LightningAutomatedPayoutSettings.cs b/BTCPayServer.Client/Models/LightningAutomatedPayoutSettings.cs index 1443197c5..848745359 100644 --- a/BTCPayServer.Client/Models/LightningAutomatedPayoutSettings.cs +++ b/BTCPayServer.Client/Models/LightningAutomatedPayoutSettings.cs @@ -11,7 +11,6 @@ public class LightningAutomatedPayoutSettings [JsonConverter(typeof(TimeSpanJsonConverter.Seconds))] public TimeSpan IntervalSeconds { get; set; } - public int? CancelPayoutAfterFailures { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)] public bool ProcessNewPayoutsInstantly { get; set; } diff --git a/BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs b/BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs index 7c47b845b..393de97e0 100644 --- a/BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs +++ b/BTCPayServer/Controllers/GreenField/GreenfieldStoreAutomatedLightningPayoutProcessorsController.cs @@ -59,7 +59,6 @@ namespace BTCPayServer.Controllers.Greenfield { PayoutMethodId = data.PayoutMethodId, IntervalSeconds = blob.Interval, - CancelPayoutAfterFailures = blob.CancelPayoutAfterFailures, ProcessNewPayoutsInstantly = blob.ProcessNewPayoutsInstantly }; } @@ -68,7 +67,6 @@ namespace BTCPayServer.Controllers.Greenfield { return new LightningAutomatedPayoutBlob() { Interval = data.IntervalSeconds, - CancelPayoutAfterFailures = data.CancelPayoutAfterFailures, ProcessNewPayoutsInstantly = data.ProcessNewPayoutsInstantly }; } diff --git a/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutBlob.cs b/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutBlob.cs index 04740f795..7ea448d8c 100644 --- a/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutBlob.cs +++ b/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutBlob.cs @@ -4,5 +4,4 @@ namespace BTCPayServer.PayoutProcessors.Lightning; public class LightningAutomatedPayoutBlob : AutomatedPayoutBlob { - public int? CancelPayoutAfterFailures { get; set; } = null; } diff --git a/BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs b/BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs index d36a52222..0888e15b1 100644 --- a/BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs +++ b/BTCPayServer/PayoutProcessors/Lightning/UILightningAutomatedPayoutProcessorsController.cs @@ -125,14 +125,11 @@ public class UILightningAutomatedPayoutProcessorsController : Controller public LightningTransferViewModel(LightningAutomatedPayoutBlob blob) { IntervalMinutes = blob.Interval.TotalMinutes; - CancelPayoutAfterFailures = blob.CancelPayoutAfterFailures; ProcessNewPayoutsInstantly = blob.ProcessNewPayoutsInstantly; } public bool ProcessNewPayoutsInstantly { get; set; } - public int? CancelPayoutAfterFailures { get; set; } - [Range(AutomatedPayoutConstants.MinIntervalMinutes, AutomatedPayoutConstants.MaxIntervalMinutes)] public double IntervalMinutes { get; set; } @@ -141,7 +138,7 @@ public class UILightningAutomatedPayoutProcessorsController : Controller return new LightningAutomatedPayoutBlob { ProcessNewPayoutsInstantly = ProcessNewPayoutsInstantly, Interval = TimeSpan.FromMinutes(IntervalMinutes), - CancelPayoutAfterFailures = CancelPayoutAfterFailures}; + }; } } } diff --git a/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml b/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml index 620c6468d..172b7615f 100644 --- a/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml +++ b/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml @@ -41,15 +41,6 @@ -
- -
- - attempts - -
-
If a payout fails this many times, it will be cancelled.
-