From 9d76b5bbc43fd2d7d05385fa2b4e4529c2da9ad8 Mon Sep 17 00:00:00 2001 From: ieow Date: Tue, 26 Mar 2024 12:00:02 +0800 Subject: [PATCH 1/2] feat: update torus utils 8 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index aa8e171..1ed653d 100644 --- a/Package.swift +++ b/Package.swift @@ -17,7 +17,7 @@ let package = Package( dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), - .package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift" , from: "7.0.1"), + .package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift" , from: "8.0.0"), // dev dependencies only .package(name:"CryptoSwift", url: "https://github.com/krzyzanowskim/CryptoSwift.git",from: "1.5.1"), .package(name:"jwt-kit", url: "https://github.com/vapor/jwt-kit.git", from: "4.0.0"), From 0a5fd6bbbfcfd4f535c156612d1138c995f25fc5 Mon Sep 17 00:00:00 2001 From: ieow Date: Tue, 26 Mar 2024 12:11:46 +0800 Subject: [PATCH 2/2] fix: test for torus-utils changes --- Tests/tkeypkgTests/IntegrationTests.swift | 4 ++-- Tests/tkeypkgTests/tkey_base.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/tkeypkgTests/IntegrationTests.swift b/Tests/tkeypkgTests/IntegrationTests.swift index e8b14e5..77915b4 100644 --- a/Tests/tkeypkgTests/IntegrationTests.swift +++ b/Tests/tkeypkgTests/IntegrationTests.swift @@ -16,7 +16,7 @@ final class integrationTests: XCTestCase { let nodeManager = NodeDetailManager(network: .sapphire(.SAPPHIRE_DEVNET)) let nodeDetail = try await nodeManager.getNodeDetails(verifier: TORUS_TEST_VERIFIER, verifierID: TORUS_TEST_EMAIL) - let torusUtils = TorusUtils(serverTimeOffset: 1000, network: .sapphire(.SAPPHIRE_DEVNET)) + let torusUtils = TorusUtils(serverTimeOffset: 1000, network: .sapphire(.SAPPHIRE_DEVNET), clientId: "CLIENT ID") let idToken = try generateIdToken(email: TORUS_TEST_EMAIL) let verifierParams = VerifierParams(verifier_id: TORUS_TEST_EMAIL) @@ -123,7 +123,7 @@ final class integrationTests: XCTestCase { let nodeManager = NodeDetailManager(network: .sapphire(.SAPPHIRE_DEVNET)) let nodeDetail = try await nodeManager.getNodeDetails(verifier: TORUS_TEST_VERIFIER, verifierID: TORUS_TEST_EMAIL) - let torusUtils = TorusUtils(serverTimeOffset: 1000, network: .sapphire(.SAPPHIRE_DEVNET)) + let torusUtils = TorusUtils(serverTimeOffset: 1000, network: .sapphire(.SAPPHIRE_DEVNET), clientId: "CLIENT ID") let idToken = try generateIdToken(email: TORUS_TEST_EMAIL) let verifierParams = VerifierParams(verifier_id: TORUS_TEST_EMAIL) diff --git a/Tests/tkeypkgTests/tkey_base.swift b/Tests/tkeypkgTests/tkey_base.swift index da98a90..6d1ac89 100644 --- a/Tests/tkeypkgTests/tkey_base.swift +++ b/Tests/tkeypkgTests/tkey_base.swift @@ -13,7 +13,7 @@ import TorusUtils class tkey_baseTests: XCTestCase { - var torus = TorusUtils.init() + var torus = TorusUtils.init(clientId: "CLIENT ID") override func setUp() async throws { let postbox_key = try! PrivateKey.generate()