From e3154f7cad6de7b89a16d81e1219b8485cfc515d Mon Sep 17 00:00:00 2001 From: Archit Date: Mon, 7 Oct 2024 17:16:21 +0530 Subject: [PATCH 1/2] removes fnd call from gettsspub key --- .../src/TorusServiceProvider.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/service-provider-torus/src/TorusServiceProvider.ts b/packages/service-provider-torus/src/TorusServiceProvider.ts index 2ad86ef8..2a8272bc 100644 --- a/packages/service-provider-torus/src/TorusServiceProvider.ts +++ b/packages/service-provider-torus/src/TorusServiceProvider.ts @@ -82,10 +82,12 @@ export class TorusServiceProvider extends ServiceProviderBase { if (!this.verifierId) throw new Error("no verifierId, not logged in"); if (!this.verifierName) throw new Error("no verifierName, not logged in"); - const { torusNodeSSSEndpoints: tssNodeEndpoints, torusNodePub: torusPubKeys } = await this.customAuthInstance.nodeDetailManager.getNodeDetails({ - verifier: this.verifierName, - verifierId: this.verifierId, - }); + const { torusNodeSSSEndpoints: tssNodeEndpoints, torusNodePub: torusPubKeys } = + this.customAuthInstance?.config?.nodeDetails || + (await this.customAuthInstance.nodeDetailManager.getNodeDetails({ + verifier: this.verifierName, + verifierId: this.verifierId, + })); return { serverEndpoints: tssNodeEndpoints, serverPubKeys: torusPubKeys.map((key) => { @@ -102,10 +104,12 @@ export class TorusServiceProvider extends ServiceProviderBase { if (!this.verifierId) throw new Error("no verifierId, not logged in"); if (!this.verifierName) throw new Error("no verifierName, not logged in"); - const { torusNodeRSSEndpoints: tssNodeEndpoints, torusNodePub: torusPubKeys } = await this.customAuthInstance.nodeDetailManager.getNodeDetails({ - verifier: this.verifierName, - verifierId: this.verifierId, - }); + const { torusNodeRSSEndpoints: tssNodeEndpoints, torusNodePub: torusPubKeys } = + this.customAuthInstance?.config?.nodeDetails || + (await this.customAuthInstance.nodeDetailManager.getNodeDetails({ + verifier: this.verifierName, + verifierId: this.verifierId, + })); return { serverEndpoints: tssNodeEndpoints, From f7c0fef7f90e89224d0c7bb96d70a43edce7505d Mon Sep 17 00:00:00 2001 From: Archit Date: Mon, 7 Oct 2024 17:19:32 +0530 Subject: [PATCH 2/2] fixes ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4689500..83fa6123 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: run: npm ci - name: Build & Lint - run: npm run lint && npm run build + run: npm run build && npm run lint - name: Test Development run: npm run test