Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Husienvora authored and Husienvora committed Oct 21, 2024
1 parent d8de462 commit 8e6b6d9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .env

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
env:
CI: true
GITHUB_ACTIONS: true
OLD_MNEMONIC:"fun rough treat scan glimpse region century purpose expire video remind second"
MNEMONIC:"vintage reflect pass input polar enlist giggle judge render position also document"
PIN:"696969"
PRIVATE_KEY_EVM:"0x7a9633b8103fec11c9e855a6b6c8c072e9af311a69b92ab0ad8186b1fb57371f"
Expand Down
17 changes: 14 additions & 3 deletions src/lib/test/vault.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
jest.setTimeout(30000);
const crypto = require("crypto");
require("dotenv").config();

let Vault = require("../vault");

require("dotenv").config();

const bufView = [
48, 0, 236, 187, 187, 172, 177, 90, 255, 184, 9, 116, 142, 96, 197, 158, 87,
35, 26, 101, 187, 30, 116, 138, 50, 131, 166, 50, 51, 197, 198, 83, 238, 167,
105, 178, 182, 108, 174, 199, 124, 141, 155, 73, 21, 85, 81, 109, 78, 233,
152, 108, 242, 238, 192, 31, 147, 86, 174, 195, 55, 229, 4, 36,
];
let oldphrase = process.env.OLD_MNEMONIC;
let phrase = process.env.MNEMONIC;

let pin = process.env.PIN;
let vault = new Vault({});

Expand Down Expand Up @@ -162,7 +167,7 @@ describe("recoverVault", () => {

test("recoverVault/logs valid", async () => {
let result = await vault.recoverVault(
phrase,
oldphrase,
bufView,
pin,
null,
Expand All @@ -173,7 +178,13 @@ describe("recoverVault", () => {
});

test("recoverVault/logs empty logs valid", async () => {
let result = await vault.recoverVault(phrase, bufView, pin, null, "logs");
let result = await vault.recoverVault(
oldphrase,
bufView,
pin,
null,
"logs"
);
expect(result).toHaveProperty("response");
});

Expand Down

0 comments on commit 8e6b6d9

Please sign in to comment.