Skip to content

Commit

Permalink
feat: make client id required
Browse files Browse the repository at this point in the history
  • Loading branch information
ieow committed Feb 1, 2024
1 parent 124bb10 commit 2166f9f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Sources/TorusUtils/TorusUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ open class TorusUtils: AbstractTorusUtils {
signerHost: String = "https://signer.tor.us/api/sign",
allowHost: String = "https://signer.tor.us/api/allow",
network: TorusNetwork = TorusNetwork.legacy(.MAINNET),
clientId: String = "",
clientId: String,
legacyMetadataHost: String = "https://metadata.tor.us"
) {
self.urlSession = urlSession
Expand Down
2 changes: 1 addition & 1 deletion Tests/TorusUtilsTests/AquaTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AquaTest: XCTestCase {

func getFNDAndTUData(verifer: String, veriferID: String, enableOneKey: Bool = false) async throws -> AllNodeDetailsModel {
let nodeDetails = try await fnd.getNodeDetails(verifier: verifer, verifierID: veriferID)
tu = TorusUtils(enableOneKey: enableOneKey, signerHost: signerHost, allowHost: allowHost, network: .legacy(.AQUA))
tu = TorusUtils(enableOneKey: enableOneKey, signerHost: signerHost, allowHost: allowHost, network: .legacy(.AQUA), clientId: "YOUR_CLIENT_ID")
return nodeDetails
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/TorusUtilsTests/CyanTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CyanTest: XCTestCase {

func getFNDAndTUData(verifer: String, veriferID: String, enableOneKey: Bool = false) async throws -> AllNodeDetailsModel {
let nodeDetails = try await fnd.getNodeDetails(verifier: verifer, verifierID: veriferID)
tu = TorusUtils(enableOneKey: enableOneKey, signerHost: signerHost, allowHost: allowHost, network: .legacy(.CYAN))
tu = TorusUtils(enableOneKey: enableOneKey, signerHost: signerHost, allowHost: allowHost, network: .legacy(.CYAN), clientId: "YOUR_CLIENT_ID")
return nodeDetails
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/TorusUtilsTests/IntegrationTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class IntegrationTests: XCTestCase {

func get_fnd_and_tu_data(verifer: String, veriferID: String, enableOneKey: Bool = false) async throws -> AllNodeDetailsModel {
let nodeDetails = try await fnd.getNodeDetails(verifier: verifer, verifierID: veriferID)
tu = TorusUtils(enableOneKey: enableOneKey, network: .legacy(.TESTNET))
tu = TorusUtils(enableOneKey: enableOneKey, network: .legacy(.TESTNET), clientId: "YOUR_CLIENT_ID")
return nodeDetails
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/TorusUtilsTests/MainnetTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MainnetTests: XCTestCase {

func get_fnd_and_tu_data(verifer: String, veriferID: String, enableOneKey: Bool = false) async throws -> AllNodeDetailsModel {
let nodeDetails = try await fnd.getNodeDetails(verifier: verifer, verifierID: veriferID)
tu = TorusUtils(enableOneKey: enableOneKey, network: .legacy(.MAINNET))
tu = TorusUtils(enableOneKey: enableOneKey, network: .legacy(.MAINNET), clientId: "YOUR_CLIENT_ID")
return nodeDetails
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/TorusUtilsTests/SapphireTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class SapphireTest: XCTestCase {

func get_fnd_and_tu_data(verifer: String, veriferID: String, enableOneKey: Bool = false) async throws -> AllNodeDetailsModel {
let nodeDetails = try await fnd.getNodeDetails(verifier: verifer, verifierID: veriferID)
torus = TorusUtils(enableOneKey: enableOneKey, network: .sapphire(.SAPPHIRE_DEVNET))
torus = TorusUtils(enableOneKey: enableOneKey, network: .sapphire(.SAPPHIRE_DEVNET), clientId: "YOUR_CLIENT_ID")
return nodeDetails
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/TorusUtilsTests/TestnetTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestnetTest: XCTestCase {

func getFNDAndTUData(verifer: String, veriferID: String, enableOneKey: Bool = false) async throws -> AllNodeDetailsModel {
let nodeDetails = try await fnd.getNodeDetails(verifier: verifer, verifierID: veriferID)
tu = TorusUtils(enableOneKey: enableOneKey, signerHost: signerHost, allowHost: allowHost, network: .legacy(.TESTNET))
tu = TorusUtils(enableOneKey: enableOneKey, signerHost: signerHost, allowHost: allowHost, network: .legacy(.TESTNET), clientId: "YOUR_CLIENT_ID")
return nodeDetails
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/TorusUtilsTests/oneKeyTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class OneKeyTest: XCTestCase {
func getFNDAndTUData(verifer: String, veriferID: String, enableOneKey: Bool = true) async throws -> AllNodeDetailsModel {
do {
let nodeDetails = try await fnd.getNodeDetails(verifier: verifer, verifierID: veriferID)
tu = TorusUtils(enableOneKey: enableOneKey, network: .legacy(.TESTNET))
tu = TorusUtils(enableOneKey: enableOneKey, network: .legacy(.TESTNET), clientId: "YOUR_CLIENT_ID")
return nodeDetails
} catch {
throw error
Expand Down

0 comments on commit 2166f9f

Please sign in to comment.