From 2beb8328f1ddfd689d2a4f1e5fb96b55ed995e26 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sun, 28 Feb 2021 13:53:27 +0100 Subject: [PATCH] Phishing protected message for extensions (#4741) * Phishing protected message for extensions * Update packages/page-accounts/src/Accounts/BannerExtension.tsx * Adjust naming --- packages/page-accounts/src/Accounts/BannerExtension.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/page-accounts/src/Accounts/BannerExtension.tsx b/packages/page-accounts/src/Accounts/BannerExtension.tsx index 0ac037dbb9..b42fcadd7a 100644 --- a/packages/page-accounts/src/Accounts/BannerExtension.tsx +++ b/packages/page-accounts/src/Accounts/BannerExtension.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { detect } from 'detect-browser'; -import React from 'react'; +import React, { useRef } from 'react'; import { Trans } from 'react-i18next'; import useExtensionCounter from '@polkadot/app-settings/useCounter'; @@ -26,6 +26,7 @@ function BannerExtension (): React.ReactElement | null { const { t } = useTranslation(); const { hasInjectedAccounts } = useApi(); const upgradableCount = useExtensionCounter(); + const phishing = useRef(t('Since some extensions, such as the polkadot-js extension, protects you against all community reported phishing sites, there are valid reasons to use them for additional protection, even if you are not storing accounts in it.')); if (!isSupported || !browserName) { return null; @@ -49,6 +50,7 @@ function BannerExtension (): React.ReactElement | null {

{t('One or more extensions are detected in your browser, however no accounts has been injected.')}

{t('Ensure that the extension has accounts, some accounts are visible globally and available for this chain and that you gave the application permission to access accounts from the extension to use them.')}

+

{phishing.current}

); } @@ -77,6 +79,7 @@ function BannerExtension (): React.ReactElement | null { rel='noopener noreferrer' target='_blank' >{t('Learn more...')}

+

{phishing.current}

); }