Incorrect explorer as error (#16177)

This commit is contained in:
Adam R 2021-11-29 10:08:24 +01:00 committed by GitHub
parent e7fc2bcadd
commit ad589e2004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -403,12 +403,8 @@ function isAssetInfoOK(chain: string, isCoin: boolean, address: string, errors:
let matchCount = 0;
explorersAlt.forEach(exp => { if (exp.toLowerCase() == explorerActualLower) { ++matchCount; }});
if (matchCount == 0) {
// none matches, this is warning/error
if (chain.toLowerCase() == CoinType.name(CoinType.ethereum) || chain.toLowerCase() == CoinType.name(CoinType.smartchain)) {
errors.push(`Incorrect explorer, ${explorerActual} instead of ${explorerExpected} (${explorersAlt.join(', ')})`);
} else {
warnings.push(`Unexpected explorer, ${explorerActual} instead of ${explorerExpected} (${explorersAlt.join(', ')})`);
}
// none matches, this is error
errors.push(`Incorrect explorer, ${explorerActual} instead of ${explorerExpected} (${explorersAlt.join(', ')})`);
}
}
}