From a8bb546449d91f21b136772f3de0e736474636d9 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Mon, 20 May 2024 07:37:46 +0200 Subject: [PATCH] Update NodeUtils.swift --- Sources/TorusUtils/Helpers/NodeUtils.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/TorusUtils/Helpers/NodeUtils.swift b/Sources/TorusUtils/Helpers/NodeUtils.swift index 8562c76e..2af6a836 100644 --- a/Sources/TorusUtils/Helpers/NodeUtils.swift +++ b/Sources/TorusUtils/Helpers/NodeUtils.swift @@ -274,7 +274,8 @@ internal class NodeUtils { var request = try MetadataUtils.makeUrlRequest(url: endpoints[i]) request.httpBody = rpcdata let val = try await URLSession(configuration: .default).data(for: request) - let decoded = try JSONDecoder().decode(JRPCResponse.self, from: val.0) + debugPrint(val) + let decoded = try JSONDecoder().decode(JRPCResponse<[ShareRequestResult]>.self, from: val.0) if decoded.error == nil { shareImportSuccess = true break @@ -480,6 +481,7 @@ internal class NodeUtils { } let elements = Array(0...decryptedShares.keys.max()!) // Note: torus.js has a bug that this line resolves + let allCombis = kCombinations(elements: elements.slice, k: threshold) var privateKey: String?