Fix try catch in for loop

This commit is contained in:
abefernan
2023-04-17 16:40:15 +02:00
parent 4ee7903b05
commit 962a239a9b
+4 -4
View File
@@ -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");
};