From 5134004ff70b4e16201c624a3a6dc54476dbf0ac Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 1 Mar 2023 21:59:01 -0800 Subject: [PATCH] Fix zap creation --- damus/Util/Zap.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/damus/Util/Zap.swift b/damus/Util/Zap.swift index 1d07e0a1..7152da38 100644 --- a/damus/Util/Zap.swift +++ b/damus/Util/Zap.swift @@ -303,8 +303,7 @@ func fetch_zap_invoice(_ payreq: LNUrlPayRequest, zapreq: NostrEvent?, sats: Int var query = [URLQueryItem(name: "amount", value: "\(amount)")] - if let zapreq, zappable && zap_type != .non_zap { - let json = event_to_json(ev: zapreq) + if let zapreq, zappable && zap_type != .non_zap, let json = encode_json(zapreq) { print("zapreq json: \(json)") query.append(URLQueryItem(name: "nostr", value: json)) }