Fix try catch in for loop
This commit is contained in:
@@ -181,14 +181,14 @@ const ChainSelect = () => {
|
||||
throw new Error("No SSL enabled RPC nodes available for this chain");
|
||||
}
|
||||
|
||||
try {
|
||||
for (const node of secureNodes) {
|
||||
for (const node of secureNodes) {
|
||||
try {
|
||||
// test client connection
|
||||
const client = await StargateClient.connect(node);
|
||||
await client.getHeight();
|
||||
return node;
|
||||
}
|
||||
} catch {}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
throw new Error("No RPC nodes available for this chain");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user