Skip to content

Commit

Permalink
report false positive for blockaid
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdevelopa committed Sep 14, 2023
1 parent 761326a commit 7a27e95
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 25 deletions.
3 changes: 3 additions & 0 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions shared/constants/security-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ type SecurityProviderConfig = Record<
readonly tKeyName: string;
/** URL to securty provider website */
readonly url: string;
/** URL to security provider support page */
readonly supportUrl: string;
}
>;

export const SECURITY_PROVIDER_CONFIG: Readonly<SecurityProviderConfig> = {
[SecurityProvider.Blockaid]: {
tKeyName: 'blockaid',
url: 'https://blockaid.io/',
supportUrl: 'https://support.metamask.io/hc/en-us',
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,52 @@ function SecurityProviderBannerAlert({
)}

{provider && (
<Text
marginTop={3}
display={Display.Flex}
alignItems={AlignItems.center}
color={Color.textAlternative}
variant={TextVariant.bodySm}
>
<Icon
className="disclosure__summary--icon"
color={IconColor.primaryDefault}
name={IconName.SecurityTick}
size={IconSize.Sm}
marginInlineEnd={1}
/>
{t('securityProviderPoweredBy', [
<ButtonLink
key={`security-provider-button-link-${provider}`}
size={Size.inherit}
href={SECURITY_PROVIDER_CONFIG[provider].url}
externalLink
>
{t(SECURITY_PROVIDER_CONFIG[provider].tKeyName)}
</ButtonLink>,
])}
</Text>
<>
<Text
marginTop={3}
display={Display.Flex}
alignItems={AlignItems.center}
color={Color.textAlternative}
variant={TextVariant.bodySm}
>
{t('somethingDoesntLookRight', [
<ButtonLink
key={`security-provider-button-supporturl-${provider}`}
size={Size.inherit}
href={SECURITY_PROVIDER_CONFIG[provider].supportUrl}
externalLink
>
{t('contactUs')}
</ButtonLink>,
])}
</Text>

<Text
marginTop={3}
display={Display.Flex}
alignItems={AlignItems.center}
color={Color.textAlternative}
variant={TextVariant.bodySm}
>
<Icon
className="disclosure__summary--icon"
color={IconColor.primaryDefault}
name={IconName.SecurityTick}
size={IconSize.Sm}
marginInlineEnd={1}
/>
{t('securityProviderPoweredBy', [
<ButtonLink
key={`security-provider-button-link-${provider}`}
size={Size.inherit}
href={SECURITY_PROVIDER_CONFIG[provider].url}
externalLink
>
{t(SECURITY_PROVIDER_CONFIG[provider].tKeyName)}
</ButtonLink>,
])}
</Text>
</>
)}
</BannerAlert>
);
Expand Down

0 comments on commit 7a27e95

Please sign in to comment.