From 4ac3e710399a62435097ba5fbfa8226c667614d6 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 31 Mar 2023 15:22:11 -0700 Subject: [PATCH] Fix OK decoding --- damus/Nostr/NostrResponse.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/damus/Nostr/NostrResponse.swift b/damus/Nostr/NostrResponse.swift index 84e60fb2..b821973d 100644 --- a/damus/Nostr/NostrResponse.swift +++ b/damus/Nostr/NostrResponse.swift @@ -69,10 +69,11 @@ enum NostrResponse: Decodable { throw error } self = .ok(cr) + return //ev.pow = count_hash_leading_zero_bits(ev.id) } - throw DecodingError.dataCorrupted(.init(codingPath: [], debugDescription: "expected EVENT or NOTICE, got \(typ)")) + throw DecodingError.dataCorrupted(.init(codingPath: [], debugDescription: "expected EVENT, NOTICE or OK, got \(typ)")) } }