diff --git a/Package.resolved b/Package.resolved index cfd5629..bee738a 100644 --- a/Package.resolved +++ b/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/torusresearch/fetch-node-details-swift.git", "state" : { - "revision" : "5f67cd080c26cf38ae91e7fe63e6217c6e401c07", - "version" : "6.0.2" + "revision" : "4bd96c33ba8d02d9e27190c5c7cedf09cfdfd656", + "version" : "6.0.3" } }, { @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/torusresearch/torus-utils-swift", "state" : { - "revision" : "ff85c3e96bfa29013309b487875c4d9383e4ac80", - "version" : "8.1.1" + "revision" : "608c28404c506983bfec7bbd957632fc0544db8c", + "version" : "8.1.2" } } ], diff --git a/Sources/SingleFactorAuth/SingleFactorAuth.swift b/Sources/SingleFactorAuth/SingleFactorAuth.swift index 2e75c9b..cf0c130 100644 --- a/Sources/SingleFactorAuth/SingleFactorAuth.swift +++ b/Sources/SingleFactorAuth/SingleFactorAuth.swift @@ -93,7 +93,7 @@ public class SingleFactorAuth { public func getKey(loginParams: LoginParams) async throws -> TorusSFAKey { let torusKey = try await self.getTorusKey(loginParams: loginParams) - let publicAddress = (torusKey.finalKeyData?.X ?? "") + (torusKey.finalKeyData?.Y ?? "") + let publicAddress = torusKey.finalKeyData?.evmAddress ?? "" let privateKey = torusKey.finalKeyData?.privKey ?? "" let torusSfaKey = TorusSFAKey(privateKey: privateKey, publicAddress: publicAddress) diff --git a/Tests/SingleFactorAuthTests/AquaTest.swift b/Tests/SingleFactorAuthTests/AquaTest.swift index a0ef98a..f5d5c8f 100644 --- a/Tests/SingleFactorAuthTests/AquaTest.swift +++ b/Tests/SingleFactorAuthTests/AquaTest.swift @@ -24,7 +24,7 @@ final class AquaTest: XCTestCase { let requiredPrivateKey = "d8204e9f8c270647294c54acd8d49ee208789f981a7503158e122527d38626d8" XCTAssertEqual(requiredPrivateKey, torusKey.getPrivateKey()) - XCTAssertEqual(torusKey.publicAddress, torusKey.getPublicAddress()) + XCTAssertEqual("0x8b32926cD9224fec3B296aA7250B049029434807", torusKey.getPublicAddress()) } func testInitialise() async throws { @@ -44,6 +44,6 @@ final class AquaTest: XCTestCase { let requiredPrivateKey = "6f8b884f19975fb0d138ed21b22a6a7e1b79e37f611d0a29f1442b34efc6bacd" XCTAssertEqual(requiredPrivateKey, torusKey.getPrivateKey()) - XCTAssertEqual(torusKey.publicAddress, torusKey.getPublicAddress()) + XCTAssertEqual("0x62BaCa60f48C2b2b7e3074f7B7b4795EeF2afD2e", torusKey.getPublicAddress()) } } diff --git a/Tests/SingleFactorAuthTests/CyanTest.swift b/Tests/SingleFactorAuthTests/CyanTest.swift index 31d6707..910a8d1 100644 --- a/Tests/SingleFactorAuthTests/CyanTest.swift +++ b/Tests/SingleFactorAuthTests/CyanTest.swift @@ -24,7 +24,7 @@ final class CyanTest: XCTestCase { let requiredPrivateKey = "223d982054fa1ad27d1497560521e4cce5b8c6438c38533c7bad27ff21ce0546" XCTAssertEqual(requiredPrivateKey, torusKey.getPrivateKey()) - XCTAssertEqual(torusKey.publicAddress, torusKey.getPublicAddress()) + XCTAssertEqual("0x6b902fBCEb0E0374e5eB9eDFe68cD4B888c32150", torusKey.getPublicAddress()) } func testInitialise() async throws { @@ -44,6 +44,6 @@ final class CyanTest: XCTestCase { let requiredPrivateKey = "66af498ea82c95d52fdb8c8dedd44cf2f758424a0eecab7ac3dd8721527ea2d4" XCTAssertEqual(requiredPrivateKey, torusKey.getPrivateKey()) - XCTAssertEqual(torusKey.publicAddress, torusKey.getPublicAddress()) + XCTAssertEqual("0xFF4c4A0Aa5D633302B5711C3047D7D5967884521", torusKey.getPublicAddress()) } } diff --git a/Tests/SingleFactorAuthTests/SingleFactorAuthTests.swift b/Tests/SingleFactorAuthTests/SingleFactorAuthTests.swift index 83917cb..9f10ab4 100644 --- a/Tests/SingleFactorAuthTests/SingleFactorAuthTests.swift +++ b/Tests/SingleFactorAuthTests/SingleFactorAuthTests.swift @@ -23,7 +23,7 @@ final class SingleFactorAuthTests: XCTestCase { let torusKey = try await singleFactoreAuth.getKey(loginParams: loginParams) let requiredPrivateKey = "296045a5599afefda7afbdd1bf236358baff580a0fe2db62ae5c1bbe817fbae4" XCTAssertEqual(requiredPrivateKey, torusKey.getPrivateKey()) - XCTAssertEqual(torusKey.publicAddress, torusKey.getPublicAddress()) + XCTAssertEqual("0x53010055542cCc0f2b6715a5c53838eC4aC96EF7", torusKey.getPublicAddress()) } func testInitialise() async throws { @@ -43,6 +43,6 @@ final class SingleFactorAuthTests: XCTestCase { let requiredPrivateKey = "ad47959db4cb2e63e641bac285df1b944f54d1a1cecdaeea40042b60d53c35d2" XCTAssertEqual(requiredPrivateKey, torusKey.getPrivateKey()) - XCTAssertEqual(torusKey.publicAddress, torusKey.getPublicAddress()) + XCTAssertEqual("0xE1155dB406dAD89DdeE9FB9EfC29C8EedC2A0C8B", torusKey.getPublicAddress()) } }