Remove CurrentRefund property in InvoiceData (#5494)

This commit is contained in:
Nicolas Dorier
2023-11-21 12:52:40 +09:00
committed by GitHub
parent d1bf47a5c0
commit 3ee4f43eb5
8 changed files with 43 additions and 32 deletions

View File

@@ -515,7 +515,7 @@ namespace BTCPayServer.Controllers.Greenfield
var ppId = await _pullPaymentService.CreatePullPayment(createPullPayment);
await using var ctx = _dbContextFactory.CreateContext();
(await ctx.Invoices.FindAsync(new[] { invoice.Id }, cancellationToken))!.CurrentRefundId = ppId;
ctx.Refunds.Add(new RefundData
{
InvoiceDataId = invoice.Id,
@@ -524,7 +524,6 @@ namespace BTCPayServer.Controllers.Greenfield
await ctx.SaveChangesAsync(cancellationToken);
var pp = await _pullPaymentService.GetPullPayment(ppId, false);
return this.Ok(CreatePullPaymentData(pp));
}