From df15d9f93e5d642730de0f8906be0f7052a2b273 Mon Sep 17 00:00:00 2001 From: Dariusz Rybicki <dariusz@elixxir.io> Date: Mon, 25 Jul 2022 16:24:39 +0100 Subject: [PATCH] Refactor --- Sources/ElixxirDAppsSDK/E2E.swift | 10 +++++----- Sources/ElixxirDAppsSDK/E2EGetContact.swift | 2 +- Sources/ElixxirDAppsSDK/E2EGetId.swift | 2 +- Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift | 2 +- Sources/ElixxirDAppsSDK/E2EPartitionSize.swift | 2 +- Sources/ElixxirDAppsSDK/E2EPayloadSize.swift | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/ElixxirDAppsSDK/E2E.swift b/Sources/ElixxirDAppsSDK/E2E.swift index da1b6d48..d9beb4e2 100644 --- a/Sources/ElixxirDAppsSDK/E2E.swift +++ b/Sources/ElixxirDAppsSDK/E2E.swift @@ -16,11 +16,11 @@ public struct E2E { extension E2E { public static func live(_ bindingsE2E: BindingsE2e) -> E2E { E2E( - getId: .live(bindingsE2E: bindingsE2E), - getReceptionId: .live(bindingsE2E: bindingsE2E), - getContact: .live(bindingsE2E: bindingsE2E), - payloadSize: .live(bindingsE2E: bindingsE2E), - partitionSize: .live(bindingsE2E: bindingsE2E), + getId: .live(bindingsE2E), + getReceptionId: .live(bindingsE2E), + getContact: .live(bindingsE2E), + payloadSize: .live(bindingsE2E), + partitionSize: .live(bindingsE2E), addPartnerCallback: .live(bindingsE2E), addService: .live(bindingsE2E), removeService: .live(bindingsE2E) diff --git a/Sources/ElixxirDAppsSDK/E2EGetContact.swift b/Sources/ElixxirDAppsSDK/E2EGetContact.swift index fc9053bc..9dba2d2b 100644 --- a/Sources/ElixxirDAppsSDK/E2EGetContact.swift +++ b/Sources/ElixxirDAppsSDK/E2EGetContact.swift @@ -10,7 +10,7 @@ public struct E2EGetContact { } extension E2EGetContact { - public static func live(bindingsE2E: BindingsE2e) -> E2EGetContact { + public static func live(_ bindingsE2E: BindingsE2e) -> E2EGetContact { E2EGetContact { guard let data = bindingsE2E.getContact() else { fatalError("BindingsE2e.getContact returned `nil`") diff --git a/Sources/ElixxirDAppsSDK/E2EGetId.swift b/Sources/ElixxirDAppsSDK/E2EGetId.swift index 08136985..b3ee86a2 100644 --- a/Sources/ElixxirDAppsSDK/E2EGetId.swift +++ b/Sources/ElixxirDAppsSDK/E2EGetId.swift @@ -10,7 +10,7 @@ public struct E2EGetId { } extension E2EGetId { - public static func live(bindingsE2E: BindingsE2e) -> E2EGetId { + public static func live(_ bindingsE2E: BindingsE2e) -> E2EGetId { E2EGetId(run: bindingsE2E.getID) } } diff --git a/Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift b/Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift index 7bbbcc40..da24b408 100644 --- a/Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift +++ b/Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift @@ -10,7 +10,7 @@ public struct E2EGetReceptionId { } extension E2EGetReceptionId { - public static func live(bindingsE2E: BindingsE2e) -> E2EGetReceptionId { + public static func live(_ bindingsE2E: BindingsE2e) -> E2EGetReceptionId { E2EGetReceptionId { guard let data = bindingsE2E.getReceptionID() else { fatalError("BindingsE2e.getReceptionID returned `nil`") diff --git a/Sources/ElixxirDAppsSDK/E2EPartitionSize.swift b/Sources/ElixxirDAppsSDK/E2EPartitionSize.swift index a3d8d722..9f7a5267 100644 --- a/Sources/ElixxirDAppsSDK/E2EPartitionSize.swift +++ b/Sources/ElixxirDAppsSDK/E2EPartitionSize.swift @@ -12,7 +12,7 @@ public struct E2EPartitionSize { } extension E2EPartitionSize { - public static func live(bindingsE2E: BindingsE2e) -> E2EPartitionSize { + public static func live(_ bindingsE2E: BindingsE2e) -> E2EPartitionSize { E2EPartitionSize( first: bindingsE2E.firstPartitionSize, second: bindingsE2E.secondPartitionSize, diff --git a/Sources/ElixxirDAppsSDK/E2EPayloadSize.swift b/Sources/ElixxirDAppsSDK/E2EPayloadSize.swift index bf2ee5ab..7412be29 100644 --- a/Sources/ElixxirDAppsSDK/E2EPayloadSize.swift +++ b/Sources/ElixxirDAppsSDK/E2EPayloadSize.swift @@ -10,7 +10,7 @@ public struct E2EPayloadSize { } extension E2EPayloadSize { - public static func live(bindingsE2E: BindingsE2e) -> E2EPayloadSize { + public static func live(_ bindingsE2E: BindingsE2e) -> E2EPayloadSize { E2EPayloadSize(run: bindingsE2E.payloadSize) } } -- GitLab