From a07745cb1d61b7cbed53716a5bf30eb56b28d2d6 Mon Sep 17 00:00:00 2001 From: Dariusz Rybicki <dariusz@elixxir.io> Date: Mon, 25 Jul 2022 19:15:30 +0100 Subject: [PATCH] Update StoreReceptionIdentity functor --- Sources/ElixxirDAppsSDK/StoreReceptionIdentity.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/ElixxirDAppsSDK/StoreReceptionIdentity.swift b/Sources/ElixxirDAppsSDK/StoreReceptionIdentity.swift index a56f212b..5752bd5d 100644 --- a/Sources/ElixxirDAppsSDK/StoreReceptionIdentity.swift +++ b/Sources/ElixxirDAppsSDK/StoreReceptionIdentity.swift @@ -2,11 +2,11 @@ import Bindings import XCTestDynamicOverlay public struct StoreReceptionIdentity { - public var run: (String, Data, Int) throws -> Bool + public var run: (String, ReceptionIdentity, Int) throws -> Bool public func callAsFunction( key: String, - identity: Data, + identity: ReceptionIdentity, cmixId: Int ) throws -> Bool { try run(key, identity, cmixId) @@ -16,7 +16,8 @@ public struct StoreReceptionIdentity { extension StoreReceptionIdentity { public static let live = StoreReceptionIdentity { key, identity, cmixId in var error: NSError? - let result = BindingsStoreReceptionIdentity(key, identity, cmixId, &error) + let identityData = try identity.encode() + let result = BindingsStoreReceptionIdentity(key, identityData, cmixId, &error) if let error = error { throw error } -- GitLab