Exclude blacklist assets from bep2 update sscript

This commit is contained in:
Mykola 2019-11-14 01:05:08 -08:00
parent 7b00d6cfdb
commit a8a7ab518a

View File

@ -3,12 +3,13 @@ const bluebird = require("bluebird")
const fs = require("fs")
const path = require("path")
const chalk = require('chalk')
const blacklist = require('../blockchains/binance/blacklist.json')
;(async () => {
const { assetInfoList } = await axios.get(`https://explorer.binance.org/api/v1/assets?page=1&rows=1000`).then(r => r.data)
await bluebird.each(assetInfoList, async ({ asset, assetImg }) => {
if (assetImg) {
if (assetImg && blacklist.indexOf(asset) == -1) {
const binanceDir = path.join(__dirname, `../blockchains/binance`)
const imagePath = `${binanceDir}/assets/${asset}/logo.png`