diff --git a/Sources/ElixxirDAppsSDK/CMix/CMix.swift b/Sources/ElixxirDAppsSDK/CMix/CMix.swift index 5edb9fe00d25b62fd414c05a6b43c42325d86dd6..fe9e27b70c11aa952d9ca026155d01cc0ac988aa 100644 --- a/Sources/ElixxirDAppsSDK/CMix/CMix.swift +++ b/Sources/ElixxirDAppsSDK/CMix/CMix.swift @@ -14,7 +14,7 @@ public struct CMix { public var waitForNetwork: CMixWaitForNetwork public var registerClientErrorCallback: CMixRegisterClientErrorCallback public var addHealthCallback: CMixAddHealthCallback - public var waitForMessageDelivery: CMixWaitForMessageDelivery + public var waitForRoundResult: CMixWaitForRoundResult public var connect: CMixConnect } @@ -34,7 +34,7 @@ extension CMix { waitForNetwork: .live(bindingsCMix), registerClientErrorCallback: .live(bindingsCMix), addHealthCallback: .live(bindingsCMix), - waitForMessageDelivery: .live(bindingsCMix), + waitForRoundResult: .live(bindingsCMix), connect: .live(bindingsCMix) ) } @@ -55,7 +55,7 @@ extension CMix { waitForNetwork: .unimplemented, registerClientErrorCallback: .unimplemented, addHealthCallback: .unimplemented, - waitForMessageDelivery: .unimplemented, + waitForRoundResult: .unimplemented, connect: .unimplemented ) } diff --git a/Sources/ElixxirDAppsSDK/CMix/Functors/CMixWaitForMessageDelivery.swift b/Sources/ElixxirDAppsSDK/CMix/Functors/CMixWaitForRoundResult.swift similarity index 63% rename from Sources/ElixxirDAppsSDK/CMix/Functors/CMixWaitForMessageDelivery.swift rename to Sources/ElixxirDAppsSDK/CMix/Functors/CMixWaitForRoundResult.swift index 7649a1da784a5fdb2b499ca53d7ae61ffb125c7c..f4c6a6a4292a17c3c29545211960c13934c7508d 100644 --- a/Sources/ElixxirDAppsSDK/CMix/Functors/CMixWaitForMessageDelivery.swift +++ b/Sources/ElixxirDAppsSDK/CMix/Functors/CMixWaitForRoundResult.swift @@ -1,7 +1,7 @@ import Bindings import XCTestDynamicOverlay -public struct CMixWaitForMessageDelivery { +public struct CMixWaitForRoundResult { public var run: (E2ESendReport, Int, MessageDeliveryCallback) throws -> Void public func callAsFunction( @@ -13,11 +13,11 @@ public struct CMixWaitForMessageDelivery { } } -extension CMixWaitForMessageDelivery { - public static func live(_ bindingsCMix: BindingsCmix) -> CMixWaitForMessageDelivery { - CMixWaitForMessageDelivery { report, timeoutMS, callback in +extension CMixWaitForRoundResult { + public static func live(_ bindingsCMix: BindingsCmix) -> CMixWaitForRoundResult { + CMixWaitForRoundResult { report, timeoutMS, callback in try bindingsCMix.wait( - forMessageDelivery: try report.encode(), + forRoundResult: try report.encode(), mdc: callback.makeBindingsMessageDeliveryCallback(), timeoutMS: timeoutMS ) @@ -25,8 +25,8 @@ extension CMixWaitForMessageDelivery { } } -extension CMixWaitForMessageDelivery { - public static let unimplemented = CMixWaitForMessageDelivery( +extension CMixWaitForRoundResult { + public static let unimplemented = CMixWaitForRoundResult( run: XCTUnimplemented("\(Self.self)") ) }