Fix: Refunds through API were ignoring BOLT11 expiration at store level (#6644)

This commit is contained in:
Nicolas Dorier
2025-03-31 09:32:12 +09:00
committed by GitHub
parent c5270fa441
commit 658ddd1f27
11 changed files with 78 additions and 60 deletions

View File

@@ -147,14 +147,13 @@ namespace BTCPayServer.Controllers
return View(model);
model.AutoApproveClaims = model.AutoApproveClaims && (await
_authorizationService.AuthorizeAsync(User, storeId, Policies.CanCreatePullPayments)).Succeeded;
await _pullPaymentService.CreatePullPayment(new CreatePullPayment
await _pullPaymentService.CreatePullPayment(CurrentStore, new CreatePullPaymentRequest
{
Name = model.Name,
Description = model.Description,
Amount = model.Amount,
Currency = model.Currency,
StoreId = storeId,
PayoutMethods = selectedPaymentMethodIds,
PayoutMethods = selectedPaymentMethodIds.Select(p => p.ToString()).ToArray(),
BOLT11Expiration = TimeSpan.FromDays(model.BOLT11Expiration),
AutoApproveClaims = model.AutoApproveClaims
});