diff --git a/package-lock.json b/package-lock.json index d822c5d6..a80ffb5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,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", @@ -3140,9 +3140,9 @@ } }, "node_modules/@toruslabs/torus.js": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@toruslabs/torus.js/-/torus.js-10.0.2.tgz", - "integrity": "sha512-JiBiIZwoZS6dyy/IB4ATwLofFVCYU7gvLM1GSwgul0raKKbln0v8FwxzxC7/s4X6DiSWtxfnwpl0L6JWlrgqkg==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@toruslabs/torus.js/-/torus.js-10.0.3.tgz", + "integrity": "sha512-5uUIgJKs5hLcLwxpVIkOM4Bp++R0CYBxcWFpLLS8NAz/mVvYVnK+P5/aD423ZBrZ0zCZemPWJtUgQfMJnxGwdw==", "dependencies": { "@toruslabs/constants": "^11.0.0", "@toruslabs/eccrypto": "^3.0.0", @@ -15030,9 +15030,9 @@ } }, "@toruslabs/torus.js": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@toruslabs/torus.js/-/torus.js-10.0.2.tgz", - "integrity": "sha512-JiBiIZwoZS6dyy/IB4ATwLofFVCYU7gvLM1GSwgul0raKKbln0v8FwxzxC7/s4X6DiSWtxfnwpl0L6JWlrgqkg==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@toruslabs/torus.js/-/torus.js-10.0.3.tgz", + "integrity": "sha512-5uUIgJKs5hLcLwxpVIkOM4Bp++R0CYBxcWFpLLS8NAz/mVvYVnK+P5/aD423ZBrZ0zCZemPWJtUgQfMJnxGwdw==", "requires": { "@toruslabs/constants": "^11.0.0", "@toruslabs/eccrypto": "^3.0.0", diff --git a/package.json b/package.json index 6b8b1187..99bfeede 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/login.ts b/src/login.ts index d5b5c98a..fb854c9b 100644 --- a/src/login.ts +++ b/src/login.ts @@ -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({