Skip to content

Commit

Permalink
quick fixes to test code
Browse files Browse the repository at this point in the history
- quick fix session time test
- quick fix sync error
- quick fix loginWithSFA return type
  • Loading branch information
matthiasgeihs committed Dec 16, 2024
1 parent 2586497 commit ef224dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/sessionTime.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ variable.forEach(async (testVariable) => {
return;
}

coreKitInstance.signatures.forEach((sig) => {
(await coreKitInstance.getSessionSignatures()).forEach((sig) => {
const parsedSig = JSON.parse(sig);
const parsedSigData = JSON.parse(atob(parsedSig.data));

Expand Down
4 changes: 3 additions & 1 deletion tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { tssLib } from "@toruslabs/tss-dkls-lib";
import BN from "bn.js";
import jwt, { Algorithm } from "jsonwebtoken";
import { tssLib as tssLibDKLS } from "@toruslabs/tss-dkls-lib";
import { TorusKey } from "@toruslabs/torus.js";

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

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

await coreKitInstance.commitChanges();
if (coreKitInstance.tKey.secp256k1Key) {
await coreKitInstance.tKey.CRITICAL_deleteTkey();
} else {
Expand Down Expand Up @@ -139,7 +141,7 @@ export const loginWithSFA = async ({
storageInstance: IStorage | IAsyncStorage;
tssLib?: TssLibType;
login?: LoginFunc;
}) => {
}): Promise<TorusKey> => {
const instance = new Web3AuthMPCCoreKit({
web3AuthClientId: "torus-key-test",
web3AuthNetwork: network,
Expand Down

0 comments on commit ef224dd

Please sign in to comment.