mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-10 00:09:18 +01:00
Remove unused field from automated payout settings
This commit is contained in:
parent
622d837ea1
commit
e4f79f046a
5 changed files with 1 additions and 17 deletions
|
@ -11,7 +11,6 @@ public class LightningAutomatedPayoutSettings
|
||||||
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
||||||
public TimeSpan IntervalSeconds { get; set; }
|
public TimeSpan IntervalSeconds { get; set; }
|
||||||
|
|
||||||
public int? CancelPayoutAfterFailures { get; set; }
|
|
||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||||
public bool ProcessNewPayoutsInstantly { get; set; }
|
public bool ProcessNewPayoutsInstantly { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||||
{
|
{
|
||||||
PayoutMethodId = data.PayoutMethodId,
|
PayoutMethodId = data.PayoutMethodId,
|
||||||
IntervalSeconds = blob.Interval,
|
IntervalSeconds = blob.Interval,
|
||||||
CancelPayoutAfterFailures = blob.CancelPayoutAfterFailures,
|
|
||||||
ProcessNewPayoutsInstantly = blob.ProcessNewPayoutsInstantly
|
ProcessNewPayoutsInstantly = blob.ProcessNewPayoutsInstantly
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -68,7 +67,6 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||||
{
|
{
|
||||||
return new LightningAutomatedPayoutBlob() {
|
return new LightningAutomatedPayoutBlob() {
|
||||||
Interval = data.IntervalSeconds,
|
Interval = data.IntervalSeconds,
|
||||||
CancelPayoutAfterFailures = data.CancelPayoutAfterFailures,
|
|
||||||
ProcessNewPayoutsInstantly = data.ProcessNewPayoutsInstantly
|
ProcessNewPayoutsInstantly = data.ProcessNewPayoutsInstantly
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,5 +4,4 @@ namespace BTCPayServer.PayoutProcessors.Lightning;
|
||||||
|
|
||||||
public class LightningAutomatedPayoutBlob : AutomatedPayoutBlob
|
public class LightningAutomatedPayoutBlob : AutomatedPayoutBlob
|
||||||
{
|
{
|
||||||
public int? CancelPayoutAfterFailures { get; set; } = null;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,14 +125,11 @@ public class UILightningAutomatedPayoutProcessorsController : Controller
|
||||||
public LightningTransferViewModel(LightningAutomatedPayoutBlob blob)
|
public LightningTransferViewModel(LightningAutomatedPayoutBlob blob)
|
||||||
{
|
{
|
||||||
IntervalMinutes = blob.Interval.TotalMinutes;
|
IntervalMinutes = blob.Interval.TotalMinutes;
|
||||||
CancelPayoutAfterFailures = blob.CancelPayoutAfterFailures;
|
|
||||||
ProcessNewPayoutsInstantly = blob.ProcessNewPayoutsInstantly;
|
ProcessNewPayoutsInstantly = blob.ProcessNewPayoutsInstantly;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ProcessNewPayoutsInstantly { get; set; }
|
public bool ProcessNewPayoutsInstantly { get; set; }
|
||||||
|
|
||||||
public int? CancelPayoutAfterFailures { get; set; }
|
|
||||||
|
|
||||||
[Range(AutomatedPayoutConstants.MinIntervalMinutes, AutomatedPayoutConstants.MaxIntervalMinutes)]
|
[Range(AutomatedPayoutConstants.MinIntervalMinutes, AutomatedPayoutConstants.MaxIntervalMinutes)]
|
||||||
public double IntervalMinutes { get; set; }
|
public double IntervalMinutes { get; set; }
|
||||||
|
|
||||||
|
@ -141,7 +138,7 @@ public class UILightningAutomatedPayoutProcessorsController : Controller
|
||||||
return new LightningAutomatedPayoutBlob {
|
return new LightningAutomatedPayoutBlob {
|
||||||
ProcessNewPayoutsInstantly = ProcessNewPayoutsInstantly,
|
ProcessNewPayoutsInstantly = ProcessNewPayoutsInstantly,
|
||||||
Interval = TimeSpan.FromMinutes(IntervalMinutes),
|
Interval = TimeSpan.FromMinutes(IntervalMinutes),
|
||||||
CancelPayoutAfterFailures = CancelPayoutAfterFailures};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,15 +41,6 @@
|
||||||
<span asp-validation-for="IntervalMinutes" class="text-danger"></span>
|
<span asp-validation-for="IntervalMinutes" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="CancelPayoutAfterFailures" class="form-label">Max Payout Failure Attempts</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input asp-for="CancelPayoutAfterFailures" min="1" class="form-control" inputmode="numeric" style="max-width:12ch;">
|
|
||||||
<span class="input-group-text">attempts</span>
|
|
||||||
<span asp-validation-for="IntervalMinutes" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-text">If a payout fails this many times, it will be cancelled.</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Add table
Reference in a new issue