Skip to content

Commit

Permalink
add lookup for legacy networks
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Jul 6, 2023
1 parent 816db84 commit b81b4bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@toruslabs/fetch-node-details": "^11.0.1",
"@toruslabs/http-helpers": "^4.0.0",
"@toruslabs/metadata-helpers": "^4.0.0",
"@toruslabs/torus.js": "^10.0.2",
"@toruslabs/torus.js": "^10.0.3",
"bowser": "^2.11.0",
"events": "^3.3.0",
"jwt-decode": "^3.1.2",
Expand Down
10 changes: 10 additions & 0 deletions src/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,16 @@ class CustomAuth {
const nodeDetails = await this.nodeDetailManager.getNodeDetails({ verifier, verifierId });
this.sentryHandler.finishTransaction(nodeTx);

if (this.torus.isLegacyNetwork) {
// Call getPublicAddress to do keyassign for legacy networks which are not migrated
const pubLookupTx = this.sentryHandler.startTransaction({
name: SENTRY_TXNS.PUB_ADDRESS_LOOKUP,
});
const address = await this.torus.getPublicAddress(nodeDetails.torusNodeEndpoints, nodeDetails.torusNodePub, { verifier, verifierId });
this.sentryHandler.finishTransaction(pubLookupTx);
log.debug("torus-direct/getTorusKey", { getPublicAddress: address });
}

log.debug("torus-direct/getTorusKey", { torusNodeEndpoints: nodeDetails.torusNodeEndpoints });

const sharesTx = this.sentryHandler.startTransaction({
Expand Down

0 comments on commit b81b4bc

Please sign in to comment.