Skip to content
Snippets Groups Projects
Commit f9c29dc3 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Refactor ConnectionMaker

parent 61d90fea
No related branches found
No related tags found
2 merge requests!13Update Bindings,!8Clean up latest merge
......@@ -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
)
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment