Hack CryptoScnamDB parsing (#51)

This commit is contained in:
Jaco Greeff
2021-01-15 19:12:22 +01:00
committed by GitHub
parent 79b8ab711b
commit 490c4a8527
+4 -1
View File
@@ -44,7 +44,10 @@ describe('crosscheck', (): void => {
});
it('has all the relevant entries from CryptoScamDb', async (): Promise<void> => {
const scamDb = yamlParse(await (await fetch(CRYPTODB)).text()) as CryptoScamEntry[];
const raw = await (await fetch(CRYPTODB)).text();
// this is a hack, the text slipped in upstream
const scamDb = yamlParse(raw.replace('∂ç', '')) as CryptoScamEntry[];
const filtered = scamDb.filter(({ subcategory }) => subcategory === 'Polkadot');
const missing = filtered.filter(({ url }) =>
!ours.includes(url.replace(/https:\/\/|http:\/\//, '').split('/')[0])