From b2547e26f48dfd7161d58a0364f5e060582eefc6 Mon Sep 17 00:00:00 2001 From: Believethehype Date: Tue, 14 Mar 2023 08:26:08 +0100 Subject: [PATCH] Update waitforinvoice.go --- waitforinvoice.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/waitforinvoice.go b/waitforinvoice.go index c5e62ed..bad17be 100644 --- a/waitforinvoice.go +++ b/waitforinvoice.go @@ -226,7 +226,11 @@ func WaitForInvoicePaid(payvalues LNURLPayValuesCustom, params *Params) { return } var jsonMap map[string]interface{} - json.Unmarshal([]byte(string(responseData)), &jsonMap) + err = json.Unmarshal([]byte(string(responseData)), &jsonMap) + if err != nil { + fmt.Print(err.Error()) + return + } if jsonMap["paid"].(bool) { payvalues.PaidAt = time.Now()