mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Allow specifing fee block target for onchain payout processor (#4065)
Co-authored-by: d11n <mail@dennisreimann.de>
This commit is contained in:
@@ -52,16 +52,22 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
|
||||
private static OnChainAutomatedPayoutSettings ToModel(PayoutProcessorData data)
|
||||
{
|
||||
var blob = BaseAutomatedPayoutProcessor<OnChainAutomatedPayoutBlob>.GetBlob(data);
|
||||
return new OnChainAutomatedPayoutSettings()
|
||||
{
|
||||
FeeBlockTarget = blob.FeeTargetBlock,
|
||||
PaymentMethod = data.PaymentMethod,
|
||||
IntervalSeconds = InvoiceRepository.FromBytes<AutomatedPayoutBlob>(data.Blob).Interval
|
||||
IntervalSeconds = blob.Interval
|
||||
};
|
||||
}
|
||||
|
||||
private static AutomatedPayoutBlob FromModel(OnChainAutomatedPayoutSettings data)
|
||||
private static OnChainAutomatedPayoutBlob FromModel(OnChainAutomatedPayoutSettings data)
|
||||
{
|
||||
return new AutomatedPayoutBlob() {Interval = data.IntervalSeconds};
|
||||
return new OnChainAutomatedPayoutBlob()
|
||||
{
|
||||
FeeTargetBlock = data.FeeBlockTarget ?? 1,
|
||||
Interval = data.IntervalSeconds
|
||||
};
|
||||
}
|
||||
|
||||
[Authorize(Policy = Policies.CanModifyStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Greenfield)]
|
||||
|
||||
Reference in New Issue
Block a user