From 3afd04a08b2e145228208d391be687dfa388cd19 Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Tue, 26 Jul 2022 13:13:25 +0100
Subject: [PATCH] Add GetFileTransferParams functor

---
 .../GetFileTransferParams.swift               | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Sources/ElixxirDAppsSDK/GetFileTransferParams.swift

diff --git a/Sources/ElixxirDAppsSDK/GetFileTransferParams.swift b/Sources/ElixxirDAppsSDK/GetFileTransferParams.swift
new file mode 100644
index 00000000..e7f04545
--- /dev/null
+++ b/Sources/ElixxirDAppsSDK/GetFileTransferParams.swift
@@ -0,0 +1,26 @@
+import Bindings
+import XCTestDynamicOverlay
+
+public struct GetFileTransferParams {
+  public var run: () -> Data
+
+  public func callAsFunction() -> Data {
+    run()
+  }
+}
+
+extension GetFileTransferParams {
+  public static let liveDefault = GetFileTransferParams {
+    guard let data = BindingsGetDefaultFileTransferParams() else {
+      fatalError("BindingsGetDefaultFileTransferParams returned `nil`")
+    }
+    return data
+  }
+}
+
+extension GetFileTransferParams {
+  public static let unimplemented = GetCmixParams(
+    run: XCTUnimplemented("\(Self.self)")
+  )
+}
+
-- 
GitLab