[Internal] Fix for Binance token auto update, exclude tokens with no decimals (#14104)

This commit is contained in:
Adam R 2021-10-05 10:38:53 +02:00 committed by GitHub
parent 0d58a93ff8
commit 7513e27564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,8 @@ export function findImagesToFetch(assetInfoList: BinanceTokenInfo[]): BinanceTok
console.log(`Checking for asset images to be fetched`);
assetInfoList.forEach((tokenInfo) => {
process.stdout.write(`.${tokenInfo.asset} `);
if (tokenInfo.assetImg) {
// pick assets only if img and decimals is present
if (tokenInfo.assetImg && tokenInfo.decimals) {
const imagePath = getChainAssetLogoPath(binanceChain, tokenInfo.asset);
if (!fs.existsSync(imagePath)) {
console.log(chalk.red(`Missing image: ${tokenInfo.asset}`));