From 0163817b9b1e2904f4f58405ad4488f6d27bd4e2 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 5 Mar 2021 15:26:34 +0100 Subject: [PATCH] Add additional cron address check (#156) --- packages/phishing/src/addrcheck.spec.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/phishing/src/addrcheck.spec.ts b/packages/phishing/src/addrcheck.spec.ts index 24846f862..b015e3209 100644 --- a/packages/phishing/src/addrcheck.spec.ts +++ b/packages/phishing/src/addrcheck.spec.ts @@ -101,9 +101,16 @@ function checkAll (): Promise<[string, string[]][]> { 'https://dot4.org/promo/', 'https://dot4.top/promo/' ].map((u) => checkTag(u, 'p', 'class="payment-title"')), + ...[ + 'https://getpolkadot.us/', + 'https://musk-in.com' + ].map((u) => checkTag(u, 'h5', 'class="transaction-address"')), + ...[ + 'https://getpolkadot.us/', + 'https://musk-in.com' + ].map((u) => checkAttr(u, 'data-clipboard-text=')), checkTag('https://polkadotairdrop.com/address/', 'cool'), - checkAttr('https://kusama-wallet.com/wallet.php', 'id="copyTarget" value='), - checkAttr('https://getpolkadot.us/', 'data-clipboard-text=') + checkAttr('https://kusama-wallet.com/wallet.php', 'id="copyTarget" value=') ]); } @@ -127,7 +134,10 @@ describe('addrcheck', (): void => { const mapMiss = results .map(([site, found]): [string, string[]] => [site, found.filter((a) => !all.includes(a))]) .filter(([, found]) => found.length) - .reduce((all, [site, found]) => ({ ...all, [site]: found }), {}); + .reduce((all: Record, [site, found]) => ({ + ...all, + [site]: (all[site] || []).concat(found) + }), {}); const sites = Object.keys(mapMiss); console.log('Sites with no results\n', JSON.stringify(listEmpty, null, 2));