Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Feb 3, 2025
1 parent 53e7066 commit 6a2bcc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/crypto/keyFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ function getEntropyBytes(): Uint8Array {

export function generateMnemonic(): string {
const ent = getEntropyBytes();
let mnem = entropyToMnemonic(ent, wordlist);
const mnem = entropyToMnemonic(ent, wordlist);
return mnem
}
10 changes: 4 additions & 6 deletions tests/keys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ import {
} from "../src/crypto/keyFactory";
import { ALICE_MNEM } from "./fixture_mnemonics";


test("keygen mnemonic", async () => {
let mnem = generateMnemonic();
const mnem = generateMnemonic();
const is_good = isMnemString(mnem);

expect(is_good).toBe(true);

let mnem2 = generateMnemonic();
expect(mnem == mnem2).toBe(false)

})
const mnem2 = generateMnemonic();
expect(mnem == mnem2).toBe(false);
});

test("bad mnemonic to pri key should fail", async () => {
const is_good = isMnemString("test should fail");
Expand Down

0 comments on commit 6a2bcc4

Please sign in to comment.