commit 4ac3e710399a62435097ba5fbfa8226c667614d6
parent 2596542cb6b3314fe5716df8f24e2fbc455b9606
Author: William Casarin <jb55@jb55.com>
Date: Fri, 31 Mar 2023 15:22:11 -0700
Fix OK decoding
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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)"))
}
}