* Hash Url

* Adjust error logging

* Adjust address log
This commit is contained in:
Jaco
2021-08-30 09:18:49 +03:00
committed by GitHub
parent 339c9ad7b0
commit 02617f168b
2 changed files with 8 additions and 4 deletions
+6
View File
@@ -43,6 +43,12 @@ describe('checkIfDenied', (): void => {
await checkIfDenied('https://polkawallets.site/something/index.html') await checkIfDenied('https://polkawallets.site/something/index.html')
).toEqual(true); ).toEqual(true);
}); });
it('returns true in list (protocol + path + #)', async (): Promise<void> => {
expect(
await checkIfDenied('https://robonomics-network-xrt.cyberfi-tech-rewards-programs-claims-erc20-token.com/myetherwallet/access-my-wallet/#/input-privatekey-mnemonic-phrase-claim-bonus')
).toEqual(true);
});
}); });
describe('checkAddress', (): void => { describe('checkAddress', (): void => {
+2 -4
View File
@@ -112,8 +112,7 @@ export async function checkAddress (address: string | Uint8Array, allowCached =
return entry[0]; return entry[0];
} catch (error) { } catch (error) {
console.error('Exception while checking address, assuming non-phishing'); console.error('Exception while checking address, assuming non-phishing', (error as Error).message);
console.error(error);
return null; return null;
} }
@@ -129,8 +128,7 @@ export async function checkIfDenied (host: string, allowCached = true): Promise<
return checkHost(deny, host); return checkHost(deny, host);
} catch (error) { } catch (error) {
console.error('Exception while checking host, assuming non-phishing'); console.error(`Exception while checking ${host}, assuming non-phishing`, (error as Error).message);
console.error(error);
return false; return false;
} }