From f9c29dc3a21405758b16b8cb80b610204025501a Mon Sep 17 00:00:00 2001 From: Dariusz Rybicki <dariusz@elixxir.io> Date: Mon, 6 Jun 2022 09:32:36 +0200 Subject: [PATCH] Refactor ConnectionMaker --- Sources/ElixxirDAppsSDK/ConnectionMaker.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/ElixxirDAppsSDK/ConnectionMaker.swift b/Sources/ElixxirDAppsSDK/ConnectionMaker.swift index aa492cc6..4baa7618 100644 --- a/Sources/ElixxirDAppsSDK/ConnectionMaker.swift +++ b/Sources/ElixxirDAppsSDK/ConnectionMaker.swift @@ -15,17 +15,17 @@ public struct ConnectionMaker { extension ConnectionMaker { public static func live(bindingsClient: BindingsClient) -> ConnectionMaker { ConnectionMaker { withAuthentication, recipientContact, myIdentity in - if !withAuthentication { + if withAuthentication { return Connection.live( - bindingsConnection: try bindingsClient.connect( - recipientContact, + bindingsAuthenticatedConnection: try bindingsClient.connect( + withAuthentication: recipientContact, myIdentity: myIdentity ) ) } else { return Connection.live( - bindingsAuthenticatedConnection: try bindingsClient.connect( - withAuthentication: recipientContact, + bindingsConnection: try bindingsClient.connect( + recipientContact, myIdentity: myIdentity ) ) -- GitLab