Skip to content

Commit 42db10e

Browse files
committed
quick fixes to test code
- quick fix session time test - quick fix sync error - quick fix loginWithSFA return type
1 parent 2586497 commit 42db10e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/sessionTime.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ variable.forEach(async (testVariable) => {
110110
return;
111111
}
112112

113-
coreKitInstance.signatures.forEach((sig) => {
113+
(await coreKitInstance.getSessionSignatures()).forEach((sig) => {
114114
const parsedSig = JSON.parse(sig);
115115
const parsedSigData = JSON.parse(atob(parsedSig.data));
116116

tests/setup.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { tssLib } from "@toruslabs/tss-dkls-lib";
33
import BN from "bn.js";
44
import jwt, { Algorithm } from "jsonwebtoken";
55
import { tssLib as tssLibDKLS } from "@toruslabs/tss-dkls-lib";
6+
import { TorusKey } from "@toruslabs/torus.js";
67

78
import { IAsyncStorage, IStorage, parseToken, TssLibType, WEB3AUTH_NETWORK_TYPE, Web3AuthMPCCoreKit } from "../src";
89

@@ -30,6 +31,7 @@ export const criticalResetAccount = async (coreKitInstance: Web3AuthMPCCoreKit):
3031
throw new Error("coreKitInstance is not set");
3132
}
3233

34+
await coreKitInstance.tKey.syncLocalMetadataTransitions();
3335
if (coreKitInstance.tKey.secp256k1Key) {
3436
await coreKitInstance.tKey.CRITICAL_deleteTkey();
3537
} else {
@@ -139,7 +141,7 @@ export const loginWithSFA = async ({
139141
storageInstance: IStorage | IAsyncStorage;
140142
tssLib?: TssLibType;
141143
login?: LoginFunc;
142-
}) => {
144+
}): Promise<TorusKey> => {
143145
const instance = new Web3AuthMPCCoreKit({
144146
web3AuthClientId: "torus-key-test",
145147
web3AuthNetwork: network,

0 commit comments

Comments
 (0)