From b2e598e444747a497d1310e9cfc63249679939f9 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:48:23 +0200 Subject: [PATCH] update --- Sources/TorusUtils/Extensions/TorusUtils+extension.swift | 2 +- Sources/TorusUtils/TorusUtils.swift | 4 ++-- Torus-utils.podspec | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift index e2543aad..32fd24d3 100644 --- a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift +++ b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift @@ -1206,7 +1206,7 @@ extension TorusUtils { internal func getPublicKeyPointFromPubkeyString(pubKey: String) throws -> (String, String) { let publicKeyHashData = Data(hex: pubKey.strip04Prefix()) if !(publicKeyHashData.count == 64) { - throw "Invalid address," + throw TorusUtilError.invalidKeySize } let xCoordinateData = publicKeyHashData.prefix(32).toHexString() diff --git a/Sources/TorusUtils/TorusUtils.swift b/Sources/TorusUtils/TorusUtils.swift index 02a5271c..7ed922a1 100644 --- a/Sources/TorusUtils/TorusUtils.swift +++ b/Sources/TorusUtils/TorusUtils.swift @@ -78,8 +78,8 @@ open class TorusUtils: AbstractTorusUtils { let result = try await session.data(for: allowHostRequest) let responseData = try JSONDecoder().decode(AllowSuccess.self, from: result.0) if (responseData.success == false ) { - let errorData = try JSONDecoder().decode(AllowRejected.self, from: result.0) - throw "code: \(errorData.code), error: \(errorData.error)" + let _ = try JSONDecoder().decode(AllowRejected.self, from: result.0) + // throw "code: \(errorData.code), error: \(errorData.error)" } } catch { os_log("retrieveShares: signer allow: %@", log: getTorusLogger(log: TorusUtilsLogger.core, type: .error), type: .error, error.localizedDescription) diff --git a/Torus-utils.podspec b/Torus-utils.podspec index 345edfa3..bfe137c3 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "8.0.5" + spec.version = "8.0.6" spec.ios.deployment_target = "13.0" spec.summary = "Retrieve user shares" spec.homepage = "https://github.com/torusresearch/torus-utils-swift"