zpay32: invoice.MilliSat is uint64 which cannot be negative
This commit is contained in:
1 parent
1a13f822c6
commit
da9d7dd363
2 files changed
-9
No files matched your search
@@ -571,11 +571,6 @@ func validateInvoice(invoice *Invoice) error {
|
||||
return fmt.Errorf("net params not set")
|
||||
}
|
||||
|
||||
// Ensure that if there is an amount set, it is not negative.
|
||||
if invoice.MilliSat != nil && *invoice.MilliSat < 0 {
|
||||
return fmt.Errorf("negative amount: %v", *invoice.MilliSat)
|
||||
}
|
||||
|
||||
// The invoice must contain a payment hash.
|
||||
if invoice.PaymentHash == nil {
|
||||
return fmt.Errorf("no payment hash found")
|
||||
|
||||
Reference in new issue
Block a user