Skip to content

Commit

Permalink
[V2/V3] feat: add handshake body checks on 'successful' handhshakes (#…
Browse files Browse the repository at this point in the history
…207)

* feat: add handshake body checks on 'successful' handhshakes

* fix: remove throwing error
  • Loading branch information
Ansonhkg authored Sep 4, 2023
1 parent 6ca3df6 commit f4f852c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/core/src/lib/lit-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ export class LitCore {
networkPubKeySet: resp.networkPublicKeySet,
};

// -- validate returned keys
if (
keys.serverPubKey === 'ERR' ||
keys.subnetPubKey === 'ERR' ||
keys.networkPubKey === 'ERR' ||
keys.networkPubKeySet === 'ERR'
) {
log('Error connecting to node. Detected "ERR" in keys', url, keys);
}

this.serverKeys[url] = keys;
})
.catch((e: any) => {
Expand Down

1 comment on commit f4f852c

@vercel
Copy link

@vercel vercel bot commented on f4f852c Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.