From 27abe05b41edc757fdbb50c811a091aa6041db97 Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Fri, 22 Jul 2022 13:49:52 +0100
Subject: [PATCH] Update NewCmix functor

---
 Sources/ElixxirDAppsSDK/NewCmix.swift | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Sources/ElixxirDAppsSDK/NewCmix.swift b/Sources/ElixxirDAppsSDK/NewCmix.swift
index 84373872..4f906a46 100644
--- a/Sources/ElixxirDAppsSDK/NewCmix.swift
+++ b/Sources/ElixxirDAppsSDK/NewCmix.swift
@@ -2,14 +2,14 @@ import Bindings
 import XCTestDynamicOverlay
 
 public struct NewCmix {
-  public var run: (String, String, Data, String?) throws -> Bool
+  public var run: (String, String, Data, String?) throws -> Void
 
   public func callAsFunction(
     ndfJSON: String,
     storageDir: String,
     password: Data,
     registrationCode: String?
-  ) throws -> Bool {
+  ) throws {
     try run(ndfJSON, storageDir, password, registrationCode)
   }
 }
@@ -21,7 +21,9 @@ extension NewCmix {
     if let error = error {
       throw error
     }
-    return result
+    if !result {
+      fatalError("BindingsNewCmix returned `false` without providing error")
+    }
   }
 }
 
-- 
GitLab