Skip to content

Commit

Permalink
fix: test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
guru-web3 committed Feb 8, 2024
1 parent 2b98215 commit b90f80f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions karmaBaseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const localBrowserConfig = (webpackConfig, karmaConfig, packageConfig) => {
frameworks: ["mocha", "webpack"],

webpack: {
module: webpackConfig[1].module,
resolve: webpackConfig[1].resolve,
plugins: webpackConfig[1].plugins,
module: webpackConfig[0].module,
resolve: webpackConfig[0].resolve,
plugins: webpackConfig[0].plugins,
},

plugins: ["karma-mocha-reporter", "karma-webkit-launcher", "karma-chrome-launcher", "karma-firefox-launcher", "karma-mocha", "karma-webpack"],
Expand Down
5 changes: 2 additions & 3 deletions packages/core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import {
import { generatePrivate } from "@toruslabs/eccrypto";
import { keccak256 } from "@toruslabs/torus.js";
import BN from "bn.js";
import crypto from "crypto";
import stringify from "json-stable-stringify";

import AuthMetadata from "./authMetadata";
Expand Down Expand Up @@ -236,8 +235,8 @@ class ThresholdKey implements ITKey {
return index && index > 0 ? new BN(keccak256(Buffer.from(`${index}${chainCode}`)).slice(2), "hex").umod(ecCurve.curve.n) : new BN(0);
}

generateSalt(length = 32) {
return crypto.randomBytes(length).toString("hex");
generateSalt() {
return generatePrivate().toString("hex");
}

async initialize(params?: {
Expand Down

0 comments on commit b90f80f

Please sign in to comment.