Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getAPIClient = ({ nodes, network }) => {
const nethash = NETHASHES[network] || network;
const clientNodes = nodes && nodes.length > 0 ? nodes : seedNodes[network];
return new APIClient(clientNodes, { nethash });
};