From 6c9b2866a215c05ed4f24eaab97d6211277d2cc9 Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Fri, 26 Aug 2022 13:12:16 +0100
Subject: [PATCH] Use Contact model in CMixConnect

---
 Sources/XXClient/CMix/Functors/CMixConnect.swift | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Sources/XXClient/CMix/Functors/CMixConnect.swift b/Sources/XXClient/CMix/Functors/CMixConnect.swift
index b25be6a9..8217730e 100644
--- a/Sources/XXClient/CMix/Functors/CMixConnect.swift
+++ b/Sources/XXClient/CMix/Functors/CMixConnect.swift
@@ -2,31 +2,31 @@ import Bindings
 import XCTestDynamicOverlay
 
 public struct CMixConnect {
-  public var run: (Bool, Int, Data, Data) throws -> Connection
+  public var run: (Bool, Int, Contact, Data) throws -> Connection
 
   public func callAsFunction(
     withAuthentication: Bool,
     e2eId: Int,
-    recipientContact: Data,
+    recipient: Contact,
     e2eParamsJSON: Data = GetE2EParams.liveDefault()
   ) throws -> Connection {
-    try run(withAuthentication, e2eId, recipientContact, e2eParamsJSON)
+    try run(withAuthentication, e2eId, recipient, e2eParamsJSON)
   }
 }
 
 extension CMixConnect {
   public static func live(_ bindingsCMix: BindingsCmix) -> CMixConnect {
-    CMixConnect { withAuthentication, e2eId, recipientContact, e2eParamsJSON in
+    CMixConnect { withAuthentication, e2eId, recipient, e2eParamsJSON in
       if withAuthentication {
         return .live(try bindingsCMix.connect(
           withAuthentication: e2eId,
-          recipientContact: recipientContact,
+          recipientContact: recipient.data,
           e2eParamsJSON: e2eParamsJSON
         ))
       } else {
         return .live(try bindingsCMix.connect(
           e2eId,
-          recipientContact: recipientContact,
+          recipientContact: recipient.data,
           e2eParamsJSON: e2eParamsJSON
         ))
       }
-- 
GitLab