From 3e6cb6ede777f904c9196162695ae19af0a08681 Mon Sep 17 00:00:00 2001 From: Dariusz Rybicki <dariusz@elixxir.io> Date: Mon, 25 Jul 2022 19:12:55 +0100 Subject: [PATCH] Update CmixMakeLegacyReceptionIdentity functor --- .../CmixMakeLegacyReceptionIdentity.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/ElixxirDAppsSDK/CmixMakeLegacyReceptionIdentity.swift b/Sources/ElixxirDAppsSDK/CmixMakeLegacyReceptionIdentity.swift index 2f461616..8ba84385 100644 --- a/Sources/ElixxirDAppsSDK/CmixMakeLegacyReceptionIdentity.swift +++ b/Sources/ElixxirDAppsSDK/CmixMakeLegacyReceptionIdentity.swift @@ -2,16 +2,19 @@ import Bindings import XCTestDynamicOverlay public struct CmixMakeLegacyReceptionIdentity { - public var run: () throws -> Data + public var run: () throws -> ReceptionIdentity - public func callAsFunction() throws -> Data { + public func callAsFunction() throws -> ReceptionIdentity { try run() } } extension CmixMakeLegacyReceptionIdentity { public static func live(_ bindingsCmix: BindingsCmix) -> CmixMakeLegacyReceptionIdentity { - CmixMakeLegacyReceptionIdentity(run: bindingsCmix.makeLegacyReceptionIdentity) + CmixMakeLegacyReceptionIdentity { + let data = try bindingsCmix.makeLegacyReceptionIdentity() + return try ReceptionIdentity.decode(data) + } } } -- GitLab