Skip to content

Commit

Permalink
Merge pull request #15 from tkey/feat/remove-fnd-call
Browse files Browse the repository at this point in the history
removes fnd call from gettsspub key
  • Loading branch information
himanshuchawla009 authored Oct 7, 2024
2 parents 778055a + f7c0fef commit 42191d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 12 additions & 8 deletions packages/service-provider-torus/src/TorusServiceProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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,
Expand Down

0 comments on commit 42191d3

Please sign in to comment.