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 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,