Merge pull request #5207 from carlaKC/4727-singleinvoice
invoicesrpc: terminate SubscribeSingleInvoice once invoice reaches a final state
This commit is contained in:
4 files changed
+425
-380
No files matched your search
@@ -362,6 +362,11 @@ func (c ContractState) String() string {
|
||||
return "Unknown"
|
||||
}
|
||||
|
||||
// IsFinal returns a boolean indicating whether an invoice state is final
|
||||
func (c ContractState) IsFinal() bool {
|
||||
return c == ContractSettled || c == ContractCanceled
|
||||
}
|
||||
|
||||
// ContractTerm is a companion struct to the Invoice struct. This struct houses
|
||||
// the necessary conditions required before the invoice can be considered fully
|
||||
// settled by the payee.
|
||||
|
||||
Reference in new issue
Block a user