Update waitforinvoice.go

This commit is contained in:
Believethehype
2023-03-14 08:26:08 +01:00
parent 7475dfc2d2
commit b2547e26f4
+5 -1
View File
@@ -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()