Update BTCPayServer/Services/Invoices/InvoiceRepository.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
This commit is contained in:
Wouter Samaey 2022-03-25 14:00:25 +01:00 committed by Andrew Camilleri
parent 5129d6aa6b
commit b2f7b4e6b9

View File

@ -475,7 +475,7 @@ namespace BTCPayServer.Services.Invoices
var oldOrderId = blob.Metadata.OrderId;
var newOrderId = newMetadata.OrderId;
if (newOrderId != null)
if (newOrderId != oldOrderId)
{
// OrderId is saved in 2 places: (1) the invoice table and (2) in the metadata field. We are updating both for consistency.
invoiceData.OrderId = newOrderId;