Commit b8b44a6e authored by cartcrom's avatar cartcrom Committed by GitHub

fix: token safety icon not under phase0 flag (#4311)

* fixed issue
* updated snapshot
parent 1d21eebc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
exports[`renders currency rows correctly when currencies list is non-empty 1`] = ` exports[`renders currency rows correctly when currencies list is non-empty 1`] = `
<DocumentFragment> <DocumentFragment>
.c8 { .c7 {
color: #6E727D; color: #6E727D;
} }
...@@ -12,21 +12,6 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] = ...@@ -12,21 +12,6 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] =
min-width: 0; min-width: 0;
} }
.c7 {
width: 0.9rem;
height: 0.9rem;
margin-left: 4px;
color: #FD4040;
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.c4 { .c4 {
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
...@@ -122,41 +107,9 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] = ...@@ -122,41 +107,9 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] =
> >
Dai Stablecoin Dai Stablecoin
</div> </div>
<div
class="c7"
color="#FD4040"
>
<svg
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
/>
<line
x1="12"
x2="12"
y1="9"
y2="13"
/>
<line
x1="12"
x2="12.01"
y1="17"
y2="17"
/>
</svg>
</div>
</div> </div>
<div <div
class="c8 css-1j6a53a" class="c7 css-1j6a53a"
> >
DAI DAI
</div> </div>
...@@ -181,41 +134,9 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] = ...@@ -181,41 +134,9 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] =
> >
USD//C USD//C
</div> </div>
<div
class="c7"
color="#FD4040"
>
<svg
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
/>
<line
x1="12"
x2="12"
y1="9"
y2="13"
/>
<line
x1="12"
x2="12.01"
y1="17"
y2="17"
/>
</svg>
</div>
</div> </div>
<div <div
class="c8 css-1j6a53a" class="c7 css-1j6a53a"
> >
USDC USDC
</div> </div>
...@@ -240,41 +161,9 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] = ...@@ -240,41 +161,9 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] =
> >
Wrapped BTC Wrapped BTC
</div> </div>
<div
class="c7"
color="#FD4040"
>
<svg
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
/>
<line
x1="12"
x2="12"
y1="9"
y2="13"
/>
<line
x1="12"
x2="12.01"
y1="17"
y2="17"
/>
</svg>
</div>
</div> </div>
<div <div
class="c8 css-1j6a53a" class="c7 css-1j6a53a"
> >
WBTC WBTC
</div> </div>
......
...@@ -7,6 +7,7 @@ import { LightGreyCard } from 'components/Card' ...@@ -7,6 +7,7 @@ import { LightGreyCard } from 'components/Card'
import QuestionHelper from 'components/QuestionHelper' import QuestionHelper from 'components/QuestionHelper'
import TokenSafetyIcon from 'components/TokenSafety/TokenSafetyIcon' import TokenSafetyIcon from 'components/TokenSafety/TokenSafetyIcon'
import { checkWarning } from 'constants/tokenSafety' import { checkWarning } from 'constants/tokenSafety'
import { Phase0Variant, usePhase0Flag } from 'featureFlags/flags/phase0'
import useTheme from 'hooks/useTheme' import useTheme from 'hooks/useTheme'
import { CSSProperties, MutableRefObject, useCallback, useMemo } from 'react' import { CSSProperties, MutableRefObject, useCallback, useMemo } from 'react'
import { FixedSizeList } from 'react-window' import { FixedSizeList } from 'react-window'
...@@ -139,6 +140,7 @@ function CurrencyRow({ ...@@ -139,6 +140,7 @@ function CurrencyRow({
const customAdded = useIsUserAddedToken(currency) const customAdded = useIsUserAddedToken(currency)
const balance = useCurrencyBalance(account ?? undefined, currency) const balance = useCurrencyBalance(account ?? undefined, currency)
const warning = currency.isNative ? null : checkWarning(currency.address) const warning = currency.isNative ? null : checkWarning(currency.address)
const phase0Flag = usePhase0Flag()
// only show add or remove buttons if not on selected list // only show add or remove buttons if not on selected list
return ( return (
...@@ -161,7 +163,7 @@ function CurrencyRow({ ...@@ -161,7 +163,7 @@ function CurrencyRow({
<Column> <Column>
<NameContainer> <NameContainer>
<CurrencyName title={currency.name}>{currency.name}</CurrencyName> <CurrencyName title={currency.name}>{currency.name}</CurrencyName>
<TokenSafetyIcon warning={warning} /> {phase0Flag === Phase0Variant.Enabled && <TokenSafetyIcon warning={warning} />}
</NameContainer> </NameContainer>
<ThemedText.DeprecatedDarkGray ml="0px" fontSize={'12px'} fontWeight={300}> <ThemedText.DeprecatedDarkGray ml="0px" fontSize={'12px'} fontWeight={300}>
{!currency.isNative && !isOnSelectedList && customAdded ? ( {!currency.isNative && !isOnSelectedList && customAdded ? (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment