Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Bouttier committed Dec 5, 2020
1 parent 65f5332 commit 990259a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
const axios = require('axios');

const fs = require('fs');
const createCsvWriter = require('csv-writer').createObjectCsvWriter;
const csv = require('csv-parser');

const cmlog = require('cmlog');
const _ = require('lodash');

const download = require('image-downloader');

const config = require('./config.json');
const fs = require('fs');

const folderPatch = process.cwd();
const cryptos = [];
Expand Down Expand Up @@ -49,7 +53,7 @@ if (!_.isEmpty(config.apikey)) {
`Retrieving the list of cryptos Total: [${cryptosData.length}]`
);

if (cryptosData.length === 0) {
if (cryptosData && cryptosData.length === 0) {
cmlog.done('All icons have been updated !');
} else {
cryptosData.forEach((crypto, index) => {
Expand Down Expand Up @@ -84,8 +88,6 @@ if (!_.isEmpty(config.apikey)) {
new Error(`Crypto icon not found => "${crypto}"`)
);

const createCsvWriter = require('csv-writer')
.createObjectCsvWriter;
const csvWriter = createCsvWriter({
path: 'blacklist.csv',
header: [{ id: 'name', title: 'NAME' }],
Expand Down
2 changes: 1 addition & 1 deletion blacklist.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
NAME
vec 2
xbtc 21
2 give
nlc 2
Expand Down Expand Up @@ -115,3 +114,4 @@ lburst
c 2
n 8 v
lc 4
vec 2

0 comments on commit 990259a

Please sign in to comment.