mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-07-19 15:45:44 +00:00
Update dev (w/ stricter tsconfig) (#3444)
This commit is contained in:
@@ -95,7 +95,7 @@ describe('added urls', (): void => {
|
||||
}, []);
|
||||
|
||||
expect(
|
||||
process.env.CI_LOG
|
||||
process.env['CI_LOG']
|
||||
? []
|
||||
: dupes
|
||||
).toEqual([]);
|
||||
|
||||
@@ -45,9 +45,9 @@ async function loopSome (site: string, matcher: () => Promise<string[] | null>):
|
||||
// shared between polkadot.center & polkadot-event.com (addresses are also the same on first run)
|
||||
function checkGetWallet (site: string): Promise<[string, string[]]> {
|
||||
return loopSome(site, async (): Promise<string[] | null> => {
|
||||
const result = await fetchJson<Record<string, string>>(`https://${site}/get_wallet.php`, TIMEOUT);
|
||||
const result = await fetchJson<{ wallet?: string }>(`https://${site}/get_wallet.php`, TIMEOUT);
|
||||
|
||||
return (result && result.wallet)
|
||||
return result?.wallet
|
||||
? [result.wallet.replace('\r', '').trim()]
|
||||
: null;
|
||||
});
|
||||
@@ -204,7 +204,7 @@ describe('addrcheck', (): void => {
|
||||
console.log('Addresses found\n', JSON.stringify(mapFound, null, 2));
|
||||
console.log('Addresses missing\n', JSON.stringify(mapMiss, null, 2));
|
||||
|
||||
sites.length && process.env.CI_LOG && fs.appendFileSync('./.github/addrcheck.md', `\n\n${sites.length} urls with missing entries found at ${new Date().toUTCString()}:\n\n${TICKS}\n${JSON.stringify(mapMiss, null, 2)}\n${TICKS}\n`);
|
||||
sites.length && process.env['CI_LOG'] && fs.appendFileSync('./.github/addrcheck.md', `\n\n${sites.length} urls with missing entries found at ${new Date().toUTCString()}:\n\n${TICKS}\n${JSON.stringify(mapMiss, null, 2)}\n${TICKS}\n`);
|
||||
|
||||
expect(sites).toEqual([]);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ const ourSiteList = JSON.parse(fs.readFileSync('all.json', 'utf-8')) as { allow:
|
||||
|
||||
function assertAndLog (check: boolean, site: string, missing: unknown): void {
|
||||
if (!check) {
|
||||
process.env.CI_LOG && fs.appendFileSync('./.github/crosscheck.md', `
|
||||
process.env['CI_LOG'] && fs.appendFileSync('./.github/crosscheck.md', `
|
||||
|
||||
Missing entries found from ${site}:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user