Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
metalurgical committed Sep 17, 2024
1 parent e5ab7cb commit cdee4e5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Sources/SingleFactorAuth/SingleFactorAuth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class SingleFactorAuth {
let torusUtils: TorusUtils
private var sessionManager: SessionManager

public init(singleFactorAuthArgs: SFAParams) throws {
sessionManager = .init()
public init(singleFactorAuthArgs: SFAParams, sessionTime: Int, allowedOrigin: String) throws {
sessionManager = SessionManager(sessionTime: sessionTime, allowedOrigin: allowedOrigin)
nodeDetailManager = NodeDetailManager(network: singleFactorAuthArgs.getNetwork())
let torusOptions = TorusOptions(clientId: singleFactorAuthArgs.getWeb3AuthClientId(), network: singleFactorAuthArgs.getNetwork(), enableOneKey: true)
try torusUtils = TorusUtils(params: torusOptions)
Expand Down
2 changes: 1 addition & 1 deletion Tests/SingleFactorAuthTests/AquaTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class AquaTest: XCTestCase {

override func setUp() {
singleFactorAuthArgs = SFAParams(web3AuthClientId: "CLIENT ID", network: .legacy(.AQUA))
singleFactoreAuth = try! SingleFactorAuth(singleFactorAuthArgs: singleFactorAuthArgs)
singleFactoreAuth = try! SingleFactorAuth(singleFactorAuthArgs: singleFactorAuthArgs, sessionTime: 86400, allowedOrigin: "single-factor-auth-swift")
}

func testConnect() async throws {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SingleFactorAuthTests/CyanTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class CyanTest: XCTestCase {

override func setUp() {
singleFactorAuthArgs = SFAParams(web3AuthClientId: "CLIENT ID", network: .legacy(.CYAN))
singleFactoreAuth = try! SingleFactorAuth(singleFactorAuthArgs: singleFactorAuthArgs)
singleFactoreAuth = try! SingleFactorAuth(singleFactorAuthArgs: singleFactorAuthArgs, sessionTime: 86400, allowedOrigin: "single-factor-auth-swift")
}

func testConnect() async throws {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SingleFactorAuthTests/SingleFactorAuthTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class SingleFactorAuthTests: XCTestCase {

override func setUp() {
singleFactorAuthArgs = SFAParams(web3AuthClientId: "CLIENT ID", network: .legacy(.TESTNET))
singleFactoreAuth = try! SingleFactorAuth(singleFactorAuthArgs: singleFactorAuthArgs)
singleFactoreAuth = try! SingleFactorAuth(singleFactorAuthArgs: singleFactorAuthArgs, sessionTime: 86400, allowedOrigin: "single-factor-auth-swift")
}

func testConnect() async throws {
Expand Down

0 comments on commit cdee4e5

Please sign in to comment.