Skip to content

Commit

Permalink
fix celeste tests
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu committed Jan 2, 2024
1 parent 331a9ef commit c8ed4d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/helpers/nodeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ export const legacyKeyAssign = async ({
const data = generateJsonRPCObject("KeyAssign", {
verifier,
verifier_id: verifierId.toString(),
key_type: keyType,
// key_type: keyType, // NOTE: key type doesnt work for legacy networks and doesnt have to , so skipping it here.
});
try {
const signedData = await post<SignerResponse>(
Expand Down
2 changes: 1 addition & 1 deletion src/loglevel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import loglevel from "loglevel";

const log = loglevel.getLogger("torus.js");
log.enableAll();
log.disableAll();

export default log;
5 changes: 2 additions & 3 deletions src/torus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Torus {

// generate temporary private and public key that is used to secure receive shares
const tmpKey = generatePrivate();
const pubKey = getPublic(tmpKey).toString("hex", 64);
const pubKey = getPublic(tmpKey).toString("hex");
const pubKeyX = pubKey.slice(2, 66);
const pubKeyY = pubKey.slice(66);
const tokenCommitment = keccak256(Buffer.from(idToken, "utf8"));
Expand All @@ -267,14 +267,13 @@ class Torus {
endpoints[i],
generateJsonRPCObject("CommitmentRequest", {
messageprefix: "mug00",
keytype: keyType,
tokencommitment: tokenCommitment.slice(2),
temppubx: pubKeyX,
temppuby: pubKeyY,
verifieridentifier: verifier,
})
).catch((err) => {
log.error("commitment", err);
log.error("commitment", err, endpoints[i]);
});
promiseArr.push(p);
}
Expand Down
4 changes: 2 additions & 2 deletions test/celeste.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const TORUS_TEST_EMAIL = "[email protected]";
const TORUS_TEST_VERIFIER = "torus-test-health";
const TORUS_TEST_AGGREGATE_VERIFIER = "torus-test-health-aggregate";

describe.only("torus utils celeste", function () {
describe("torus utils celeste", function () {
let torus: TorusUtils;
let TORUS_NODE_MANAGER: NodeManager;

Expand Down Expand Up @@ -149,7 +149,7 @@ describe.only("torus utils celeste", function () {
expect(metadata.upgraded).to.equal(false);
});

it.only("should be able to login", async function () {
it("should be able to login", async function () {
const token = generateIdToken(TORUS_TEST_EMAIL, "ES256");
const verifierDetails = { verifier: TORUS_TEST_VERIFIER, verifierId: TORUS_TEST_EMAIL };
const { torusNodeEndpoints, torusIndexes } = await TORUS_NODE_MANAGER.getNodeDetails(verifierDetails);
Expand Down

0 comments on commit c8ed4d4

Please sign in to comment.