From e8bc9b963fd5d80d787bcc7f0913ffcf5a64a747 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sun, 24 Jan 2021 11:26:48 +0100 Subject: [PATCH] Add checkAddress sample --- packages/phishing/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/phishing/README.md b/packages/phishing/README.md index 628fe0cb8..416068712 100644 --- a/packages/phishing/README.md +++ b/packages/phishing/README.md @@ -1,5 +1,7 @@ # @polkadot/phishing +To check for sites that are on the list - + ```js import { checkIfDenied } from '@polkadot/phishing'; @@ -7,3 +9,17 @@ const isOnDeny = await checkIfDenied(window.location.host); console.log(`isOnDeny=${isOnDeny}`); ``` + +To check for addresses that are on the list - + +```js +import { checkAddress } from '@polkadot/phishing'; + +const info = await checkAddress('1b....'); + +if (info) { + console.log(`The address is reported as ${info}`); +} else { + console.log('Not reported'); +} +```