Skip to content

Commit

Permalink
Phishing protected message for extensions (#4741)
Browse files Browse the repository at this point in the history
* Phishing protected message for extensions

* Update packages/page-accounts/src/Accounts/BannerExtension.tsx

* Adjust naming
  • Loading branch information
jacogr authored Feb 28, 2021
1 parent 1587f49 commit 2beb832
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/page-accounts/src/Accounts/BannerExtension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -26,6 +26,7 @@ function BannerExtension (): React.ReactElement | null {
const { t } = useTranslation();
const { hasInjectedAccounts } = useApi();
const upgradableCount = useExtensionCounter();
const phishing = useRef<string>(t<string>('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;
Expand All @@ -49,6 +50,7 @@ function BannerExtension (): React.ReactElement | null {
<Banner type='warning'>
<p>{t<string>('One or more extensions are detected in your browser, however no accounts has been injected.')}</p>
<p>{t<string>('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.')}</p>
<p>{phishing.current}</p>
</Banner>
);
}
Expand Down Expand Up @@ -77,6 +79,7 @@ function BannerExtension (): React.ReactElement | null {
rel='noopener noreferrer'
target='_blank'
>{t<string>('Learn more...')}</a></p>
<p>{phishing.current}</p>
</Banner>
);
}
Expand Down

0 comments on commit 2beb832

Please sign in to comment.