-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update tests to check server time offset
- Loading branch information
himanshu
committed
Mar 5, 2024
1 parent
a7d1ecd
commit 7c77945
Showing
8 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,8 @@ describe("torus onekey", function () { | |
const { torusNodeEndpoints, torusNodePub } = await TORUS_NODE_MANAGER.getNodeDetails(verifierDetails); | ||
const publicAddress = (await torus.getPublicAddress(torusNodeEndpoints, torusNodePub, verifierDetails)) as TorusPublicKey; | ||
expect(publicAddress.finalKeyData.evmAddress).to.be.equal("0x930abEDDCa6F9807EaE77A3aCc5c78f20B168Fd1"); | ||
expect(publicAddress.metadata.serverTimeOffset).lessThan(20); | ||
|
||
delete publicAddress.metadata.serverTimeOffset; | ||
|
||
expect(publicAddress).eql({ | ||
|
@@ -66,6 +68,8 @@ describe("torus onekey", function () { | |
{ verifier_id: TORUS_TEST_EMAIL }, | ||
token | ||
); | ||
expect(retrieveSharesResponse.metadata.serverTimeOffset).lessThan(20); | ||
|
||
delete retrieveSharesResponse.metadata.serverTimeOffset; | ||
|
||
expect(retrieveSharesResponse.finalKeyData.privKey).to.be.equal("296045a5599afefda7afbdd1bf236358baff580a0fe2db62ae5c1bbe817fbae4"); | ||
|
@@ -115,6 +119,8 @@ describe("torus onekey", function () { | |
}, | ||
hashedIdToken.substring(2) | ||
); | ||
expect(retrieveSharesResponse.metadata.serverTimeOffset).lessThan(20); | ||
|
||
delete retrieveSharesResponse.metadata.serverTimeOffset; | ||
|
||
expect(retrieveSharesResponse.finalKeyData.evmAddress).to.be.equal("0xE1155dB406dAD89DdeE9FB9EfC29C8EedC2A0C8B"); | ||
|
@@ -188,6 +194,7 @@ describe("torus onekey", function () { | |
{ verifier_id: "[email protected]" }, | ||
token | ||
); | ||
expect(retrieveSharesResponse.metadata.serverTimeOffset).lessThan(20); | ||
delete retrieveSharesResponse.metadata.serverTimeOffset; | ||
|
||
expect(retrieveSharesResponse.finalKeyData.privKey).to.be.equal("9ec5b0504e252e35218c7ce1e4660eac190a1505abfbec7102946f92ed750075"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters