Skip to content

Commit cadce23

Browse files
aakselrodRoasbeef
authored andcommitted
invoices: ensure AMP subinvoices are correctly updated w/nativesql
1 parent 8c6e243 commit cadce23

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

invoices/sql_store.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,13 @@ func (s *sqlInvoiceUpdater) UpdateAmpState(setID [32]byte,
12831283
return err
12841284
}
12851285

1286+
if settleIndex.Valid {
1287+
updatedState := s.invoice.AMPState[setID]
1288+
updatedState.SettleIndex = uint64(settleIndex.Int64)
1289+
updatedState.SettleDate = s.updateTime.UTC()
1290+
s.invoice.AMPState[setID] = updatedState
1291+
}
1292+
12861293
return nil
12871294
}
12881295

0 commit comments

Comments
 (0)