diff --git a/Sources/XXClient/Callbacks/UdLookupCallback.swift b/Sources/XXClient/Callbacks/UdLookupCallback.swift index 772933fce417dc45e5beec96d514430e152c12b6..94fe0e5ae7c55cafb692246bfb0067fc902d85dd 100644 --- a/Sources/XXClient/Callbacks/UdLookupCallback.swift +++ b/Sources/XXClient/Callbacks/UdLookupCallback.swift @@ -2,11 +2,11 @@ import Bindings import XCTestDynamicOverlay public struct UdLookupCallback { - public init(handle: @escaping (Result<Data, NSError>) -> Void) { + public init(handle: @escaping (Result<Contact, NSError>) -> Void) { self.handle = handle } - public var handle: (Result<Data, NSError>) -> Void + public var handle: (Result<Contact, NSError>) -> Void } extension UdLookupCallback { @@ -28,7 +28,7 @@ extension UdLookupCallback { if let error = err { callback.handle(.failure(error as NSError)) } else if let data = contactBytes { - callback.handle(.success(data)) + callback.handle(.success(Contact.live(data))) } else { fatalError("BindingsUdLookupCallback received `nil` data and `nil` error") }