Skip to content

Commit

Permalink
invoices: ensure AMP subinvoices are correctly updated w/nativesql
Browse files Browse the repository at this point in the history
  • Loading branch information
aakselrod authored and guggero committed Aug 30, 2024
1 parent 0d430b4 commit 4a3a3c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions invoices/sql_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4a3a3c7

Please sign in to comment.