Merge branch 'master' into nymkappa/feature/pools-json-frontend-cleanup

This commit is contained in:
Felipe Knorr Kuhn
2023-01-11 21:38:33 -08:00
committed by GitHub
62 changed files with 1479 additions and 585 deletions

View File

@@ -54,9 +54,13 @@ function downloadMiningPoolLogos() {
response.on('end', () => {
let response_body = Buffer.concat(chunks_of_data);
const poolLogos = JSON.parse(response_body.toString());
for (const poolLogo of poolLogos) {
download(`${PATH}/mining-pools/${poolLogo.name}`, poolLogo.download_url);
try {
const poolLogos = JSON.parse(response_body.toString());
for (const poolLogo of poolLogos) {
download(`${PATH}/mining-pools/${poolLogo.name}`, poolLogo.download_url);
}
} catch (e) {
console.error(`Unable to download mining pool logos. Trying again at next restart. Reason: ${e instanceof Error ? e.message : e}`);
}
});