Skip to content

Commit aa860a8

Browse files
Merge pull request #676 from LIT-Protocol/feature/lit-3946-wait-for-threshold-nodes-when-signing-session-keys
feat: only wait for threshold nodes when signing session keys
2 parents c4f2b5c + 76d813e commit aa860a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/lit-node-client-nodejs/src/lib/lit-node-client-nodejs.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ export class LitNodeClientNodeJs
18691869
res = await this.handleNodePromises(
18701870
nodePromises,
18711871
requestId,
1872-
this.connectedNodes.size
1872+
this.config.minNodeCount
18731873
);
18741874
log('signSessionKey node promises:', res);
18751875
} catch (e) {
@@ -1934,7 +1934,11 @@ export class LitNodeClientNodeJs
19341934
for (const field of requiredFields) {
19351935
const key: keyof BlsResponseData = field as keyof BlsResponseData;
19361936

1937-
if (!data[key] || data[key] === '') {
1937+
if (
1938+
data[key] === undefined ||
1939+
data[key] === null ||
1940+
data[key] === ''
1941+
) {
19381942
log(
19391943
`[signSessionKey] Invalid signed data. "${field}" is missing. Not a problem, we only need ${this.config.minNodeCount} nodes to sign the session key.`
19401944
);

0 commit comments

Comments
 (0)