From 0f4cb344fed1a5fdc42a3c2ac1c9c09fbfaa21df Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Tue, 9 Aug 2022 18:58:33 +0100
Subject: [PATCH] Replace CMixWaitForMessageDelivery with
 CMixWaitForRoundResult

---
 Sources/ElixxirDAppsSDK/CMix/CMix.swift            |  6 +++---
 ...Delivery.swift => CMixWaitForRoundResult.swift} | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)
 rename Sources/ElixxirDAppsSDK/CMix/Functors/{CMixWaitForMessageDelivery.swift => CMixWaitForRoundResult.swift} (63%)

diff --git a/Sources/ElixxirDAppsSDK/CMix/CMix.swift b/Sources/ElixxirDAppsSDK/CMix/CMix.swift
index 5edb9fe0..fe9e27b7 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 7649a1da..f4c6a6a4 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)")
   )
 }
-- 
GitLab