@toruslabs/torus.js
Advanced tools
Comparing version 12.3.7 to 12.3.8
@@ -925,2 +925,3 @@ import stringify from 'json-stable-stringify'; | ||
for (let i = 0; i < completedRequests.length; i += 1) { | ||
var _currentShareResponse; | ||
const currentShareResponse = completedRequests[i]; | ||
@@ -936,3 +937,6 @@ const { | ||
} = currentShareResponse.result; | ||
isNewKeyResponses.push(isNewKey); | ||
isNewKeyResponses.push({ | ||
isNewKey, | ||
publicKey: ((_currentShareResponse = currentShareResponse.result) === null || _currentShareResponse === void 0 || (_currentShareResponse = _currentShareResponse.keys[0]) === null || _currentShareResponse === void 0 || (_currentShareResponse = _currentShareResponse.public_key) === null || _currentShareResponse === void 0 ? void 0 : _currentShareResponse.X) || "" | ||
}); | ||
serverTimeOffsetResponses.push(serverTimeOffsetResponse || "0"); | ||
@@ -1031,3 +1035,8 @@ if ((sessionTokenSigs === null || sessionTokenSigs === void 0 ? void 0 : sessionTokenSigs.length) > 0) { | ||
} | ||
const thresholdIsNewKey = thresholdSame(isNewKeyResponses, minThreshold); | ||
let isNewKey = false; | ||
isNewKeyResponses.forEach(x => { | ||
if (x.isNewKey === "true" && x.publicKey.toLowerCase() === thresholdPublicKey.X.toLowerCase()) { | ||
isNewKey = true; | ||
} | ||
}); | ||
@@ -1042,3 +1051,3 @@ // Convert each string timestamp to a number | ||
nodeIndexes, | ||
isNewKey: thresholdIsNewKey === "true", | ||
isNewKey, | ||
serverTimeOffsetResponse: serverTimeOffset || calculateMedian(serverOffsetTimes) | ||
@@ -1045,0 +1054,0 @@ }; |
{ | ||
"name": "@toruslabs/torus.js", | ||
"version": "12.3.7", | ||
"version": "12.3.8", | ||
"description": "Handle communication with torus nodes", | ||
@@ -5,0 +5,0 @@ "main": "dist/torusUtils.cjs.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
390359
3716
0