mirror of
https://github.com/believethehype/nostdress.git
synced 2026-06-19 15:28:19 -07:00
Update waitforinvoice.go
This commit is contained in:
+9
-7
@@ -242,11 +242,6 @@ func WaitForInvoicePaid(payvalues LNURLPayValuesCustom, params *Params) {
|
||||
//TODO
|
||||
|
||||
}
|
||||
//Timeout waiting for payment after maxiterations
|
||||
if maxiterations == 0 {
|
||||
log.Debug().Str("NIP57", bolt11.PaymentHash).Msg("Timed out")
|
||||
close(quit)
|
||||
}
|
||||
|
||||
//If invoice is paid and DescriptionHash matches Nip57 DescriptionHash, publish Zap Nostr Event. This is rather a sanity check.
|
||||
if isPaid {
|
||||
@@ -257,9 +252,16 @@ func WaitForInvoicePaid(payvalues LNURLPayValuesCustom, params *Params) {
|
||||
close(quit)
|
||||
return
|
||||
}
|
||||
|
||||
maxiterations--
|
||||
}
|
||||
|
||||
//Timeout waiting for payment after maxiterations
|
||||
if maxiterations == 0 {
|
||||
log.Debug().Str("NIP57", bolt11.PaymentHash).Msg("Timed out")
|
||||
close(quit)
|
||||
return
|
||||
}
|
||||
maxiterations--
|
||||
|
||||
case <-quit:
|
||||
ticker.Stop()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user