Skip to content
Snippets Groups Projects
Commit 4601f66d authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Use Contact model in UdLookupCallback

parent 6f36b356
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!42Update Bindings
...@@ -2,11 +2,11 @@ import Bindings ...@@ -2,11 +2,11 @@ import Bindings
import XCTestDynamicOverlay import XCTestDynamicOverlay
public struct UdLookupCallback { public struct UdLookupCallback {
public init(handle: @escaping (Result<Data, NSError>) -> Void) { public init(handle: @escaping (Result<Contact, NSError>) -> Void) {
self.handle = handle self.handle = handle
} }
public var handle: (Result<Data, NSError>) -> Void public var handle: (Result<Contact, NSError>) -> Void
} }
extension UdLookupCallback { extension UdLookupCallback {
...@@ -28,7 +28,7 @@ extension UdLookupCallback { ...@@ -28,7 +28,7 @@ extension UdLookupCallback {
if let error = err { if let error = err {
callback.handle(.failure(error as NSError)) callback.handle(.failure(error as NSError))
} else if let data = contactBytes { } else if let data = contactBytes {
callback.handle(.success(data)) callback.handle(.success(Contact.live(data)))
} else { } else {
fatalError("BindingsUdLookupCallback received `nil` data and `nil` error") fatalError("BindingsUdLookupCallback received `nil` data and `nil` error")
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment