Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function updateNetworks(userNetworks = []) {
keys(networks).forEach((name) => {
if (!PREDEFINED_NETWORKS.includes(name)) {
settings.removeNetwork(name);
}
});
settings.addNetwork(new rpc.Network(nosTestnetConfig));
settings.addNetwork(new rpc.Network(nosLocalConfig));
// settings.addNetwork(new rpc.Network(arkConfig));
userNetworks.forEach((network) => {
settings.addNetwork(new rpc.Network(network));
});
}
export default function updateNetworks(userNetworks = []) {
keys(networks).forEach((name) => {
if (!PREDEFINED_NETWORKS.includes(name)) {
settings.removeNetwork(name);
}
});
settings.addNetwork(new rpc.Network(nosTestnetConfig));
settings.addNetwork(new rpc.Network(nosLocalConfig));
// settings.addNetwork(new rpc.Network(arkConfig));
userNetworks.forEach((network) => {
settings.addNetwork(new rpc.Network(network));
});
}
export default function updateNetworks(userNetworks = []) {
keys(networks).forEach((name) => {
if (!PREDEFINED_NETWORKS.includes(name)) {
settings.removeNetwork(name);
}
});
settings.addNetwork(new rpc.Network(nosTestnetConfig));
settings.addNetwork(new rpc.Network(nosLocalConfig));
userNetworks.forEach((network) => {
settings.addNetwork(new rpc.Network(network));
});
}
userNetworks.forEach((network) => {
settings.addNetwork(new rpc.Network(network));
});
}
export default function updateNetworks(userNetworks = []) {
keys(networks).forEach((name) => {
if (!PREDEFINED_NETWORKS.includes(name)) {
settings.removeNetwork(name);
}
});
settings.addNetwork(new rpc.Network(nosTestnetConfig));
settings.addNetwork(new rpc.Network(nosLocalConfig));
userNetworks.forEach((network) => {
settings.addNetwork(new rpc.Network(network));
});
}
userNetworks.forEach((network) => {
settings.addNetwork(new rpc.Network(network));
});
}