From 00adf797bbcfb1d2d397a4abc8f509f22f60b2bb Mon Sep 17 00:00:00 2001 From: Believethehype Date: Sun, 9 Apr 2023 22:51:55 +0200 Subject: [PATCH] Update waitforinvoice.go --- waitforinvoice.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/waitforinvoice.go b/waitforinvoice.go index a90abde..407f194 100644 --- a/waitforinvoice.go +++ b/waitforinvoice.go @@ -195,6 +195,9 @@ func WaitForInvoicePaid(payvalues LNURLPayValuesCustom, params *Params) { go sendMessage(params.Npub, "Received Profile Zap from "+payvalues.Sender+" with amount: "+strconv.FormatInt(amount, 10)+" "+satsr+" ⚡️.") } } + log.Debug().Str("ZAPPED ⚡️", "Published zap on Nostr").Msg("Nostr") + close(quit) + return } } else if params.Npub != "" && params.NotifyNonZap { @@ -209,15 +212,15 @@ func WaitForInvoicePaid(payvalues LNURLPayValuesCustom, params *Params) { } else { go sendMessage(params.Npub, "Received Non-Zap! Amount: "+strconv.FormatInt(amount, 10)+" "+satsr+" ⚡️.") } + log.Debug().Str("ZAPPED ⚡️", "Published zap on Nostr").Msg("Nostr") + close(quit) + return } - log.Debug().Str("ZAPPED ⚡️", "Published zap on Nostr").Msg("Nostr") - close(quit) - return - - maxiterations-- } + maxiterations-- + case <-quit: ticker.Stop() return