invoices: ensure AMP subinvoices are correctly updated w/nativesql

This commit is contained in:
Alex Akselrod authored and Andras Banki-Horvath committed 2024-09-03 19:40:46 +02:00
1 parent e3a939aa0d
commit ffbdcc1d5d
1 file changed
+7
+7
View File
@@ -1283,6 +1283,13 @@ func (s *sqlInvoiceUpdater) UpdateAmpState(setID [32]byte,
return err
}
if settleIndex.Valid {
updatedState := s.invoice.AMPState[setID]
updatedState.SettleIndex = uint64(settleIndex.Int64)
updatedState.SettleDate = s.updateTime.UTC()
s.invoice.AMPState[setID] = updatedState
}
return nil
}