Skip to content

Commit

Permalink
fix check error & update blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebouttier committed Jul 13, 2021
1 parent 9d01537 commit d78c6b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ if (!_.isEmpty(config.apikey)) {
})
.catch((err) => {
cmlog.error(new Error(`Error => "${cryptoName} ${err}"`));
if (err && err.response && err.response.status === 400) {

//&& err.response && err.response.status === 400
if (err) {
cmlog.error(new Error(`Crypto icon not found => "${cryptoName}"`));

const csvWriter = createCsvWriter({
Expand All @@ -100,9 +102,12 @@ if (!_.isEmpty(config.apikey)) {
const records = [{ name: cryptoName }];

csvWriter
.writeRecords(records) // returns a promise
.writeRecords(records)
.then(() => {
cmlog.info(`Crypto add blacklist => ${cryptoName}"`);
})
.catch((err) => {
cmlog.error(new Error(`Error write icon in blacklist => "${cryptoName}"`));
});
}
});
Expand Down
5 changes: 5 additions & 0 deletions blacklist.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ xtoken
wntr
kei
peepo
crazytime
hina
charixtoken
bite
avatar
pawg
clit
hdpф
τbtc
τdoge
tulip₿

0 comments on commit d78c6b1

Please sign in to comment.