Skip to content

Commit 6e75ea8

Browse files
committed
fix: reset is not require as the email is generated
1 parent 0b7b931 commit 6e75ea8

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

tests/sfaImport.spec.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import test from "node:test";
44
import { tssLib as tssLibDKLS } from "@toruslabs/tss-dkls-lib";
55
import { tssLib as tssLibFROST } from "@toruslabs/tss-frost-lib";
66

7-
import { AsyncStorage, MemoryStorage, TssLibType, TssShareType, WEB3AUTH_NETWORK } from "../src";
8-
import { criticalResetAccount, generateRandomEmail, loginWithSFA, newCoreKitLogInInstance } from "./setup";
7+
import { MemoryStorage, TssLibType, TssShareType, WEB3AUTH_NETWORK } from "../src";
8+
import { generateRandomEmail, loginWithSFA, newCoreKitLogInInstance } from "./setup";
99

1010
type ImportKeyTestVariable = {
1111
manualSync?: boolean;
@@ -26,17 +26,9 @@ export const ImportSFATest = async (testVariable: ImportKeyTestVariable) => {
2626
});
2727
}
2828

29-
async function resetAccount(email: string) {
30-
const kit = await newCoreKitInstance(email);
31-
await criticalResetAccount(kit);
32-
await kit.logout();
33-
await new AsyncStorage(kit._storageKey, storageInstance).resetStore();
34-
}
3529

3630
test(`import sfa key and recover tss key : ${testVariable.manualSync}`, async function (t) {
37-
const afterTest = async () => {
38-
await resetAccount(testVariable.email);
39-
};
31+
4032
await t.test("#recover Tss key using 2 factors key, import tss key to new oauth login", async function () {
4133
const sfaResult = await loginWithSFA({
4234
network: WEB3AUTH_NETWORK.DEVNET,
@@ -85,7 +77,6 @@ export const ImportSFATest = async (testVariable: ImportKeyTestVariable) => {
8577

8678
});
8779

88-
await afterTest();
8980
t.afterEach(function () {
9081
return console.info("finished running recovery test");
9182
});

0 commit comments

Comments
 (0)