diff --git a/ui/home/LatestTxsItem.tsx b/ui/home/LatestTxsItem.tsx
index 598bc16e8b..f4b6989068 100644
--- a/ui/home/LatestTxsItem.tsx
+++ b/ui/home/LatestTxsItem.tsx
@@ -62,7 +62,7 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => {
- { protocolTag && }
+ { protocolTag && }
{
- { protocolTag && }
+ { protocolTag && }
diff --git a/ui/hotContracts/HotContractsListItem.tsx b/ui/hotContracts/HotContractsListItem.tsx
index 4f6f256fe8..d832acca0a 100644
--- a/ui/hotContracts/HotContractsListItem.tsx
+++ b/ui/hotContracts/HotContractsListItem.tsx
@@ -33,6 +33,7 @@ const HotContractsListItem = ({ data, isLoading, exchangeRate }: Props) => {
) }
diff --git a/ui/hotContracts/HotContractsTableItem.tsx b/ui/hotContracts/HotContractsTableItem.tsx
index 1f3d2eb51e..f8ccda38ef 100644
--- a/ui/hotContracts/HotContractsTableItem.tsx
+++ b/ui/hotContracts/HotContractsTableItem.tsx
@@ -39,6 +39,7 @@ const HotContractsTableItem = ({
isLoading={ isLoading }
tags={ protocolTags }
mt="10px"
+ noColors
/>
) }
diff --git a/ui/searchResults/SearchResultEntityTag.tsx b/ui/searchResults/SearchResultEntityTag.tsx
index 384497f88f..906f677f20 100644
--- a/ui/searchResults/SearchResultEntityTag.tsx
+++ b/ui/searchResults/SearchResultEntityTag.tsx
@@ -20,7 +20,7 @@ const SearchResultEntityTag = ({ metadata, searchTerm, addressHash, ...rest }: P
return (
}
+ startElement={ }
>
diff --git a/ui/shared/EntityTags/EntityTag.tsx b/ui/shared/EntityTags/EntityTag.tsx
index afff1ed5c6..3315eb0f5b 100644
--- a/ui/shared/EntityTags/EntityTag.tsx
+++ b/ui/shared/EntityTags/EntityTag.tsx
@@ -18,14 +18,15 @@ interface Props extends HTMLChakraProps<'span'> {
addressHash?: string;
isLoading?: boolean;
noLink?: boolean;
+ noColors?: boolean;
}
-const EntityTag = ({ data, addressHash, isLoading, noLink, ...rest }: Props) => {
+const EntityTag = ({ data, addressHash, isLoading, noLink, noColors, ...rest }: Props) => {
const multichainContext = useMultichainContext();
const linkParams = !noLink ? getTagLinkParams(data, multichainContext) : undefined;
const hasLink = Boolean(linkParams);
- const iconColor = data.meta?.textColor ?? 'icon.secondary';
+ const iconColor = (!noColors && data.meta?.textColor) || 'icon.secondary';
const handleLinkClick = React.useCallback(() => {
if (!linkParams?.href) {
@@ -62,9 +63,9 @@ const EntityTag = ({ data, addressHash, isLoading, noLink, ...rest }: Props) =>
{ ...rest }
>
}
+ bg={ !noColors ? data.meta?.bgColor : undefined }
+ color={ !noColors ? data.meta?.textColor : undefined }
+ startElement={ }
truncated
endElement={ linkParams?.type === 'external' ? : null }
endElementProps={ linkParams?.type === 'external' ? { ml: -1 } : undefined }
diff --git a/ui/shared/EntityTags/EntityTagIcon.tsx b/ui/shared/EntityTags/EntityTagIcon.tsx
index f0803f5ae3..95e4414af9 100644
--- a/ui/shared/EntityTags/EntityTagIcon.tsx
+++ b/ui/shared/EntityTags/EntityTagIcon.tsx
@@ -8,14 +8,14 @@ import IconSvg from 'ui/shared/IconSvg';
interface Props {
data: EntityTag;
- ignoreColor?: boolean;
+ noColors?: boolean;
}
-const EntityTagIcon = ({ data, ignoreColor }: Props) => {
+const EntityTagIcon = ({ data, noColors }: Props) => {
- const iconColor = data.meta?.textColor && !ignoreColor ? data.meta.textColor : 'icon.secondary';
+ const iconColor = (!noColors && data.meta?.textColor) || 'icon.secondary';
- if (data.meta?.tagIcon) {
+ if (data.meta?.tagIcon && !noColors) {
return ;
}
diff --git a/ui/shared/EntityTags/EntityTags.tsx b/ui/shared/EntityTags/EntityTags.tsx
index 9020985f6b..5d5b32b9ba 100644
--- a/ui/shared/EntityTags/EntityTags.tsx
+++ b/ui/shared/EntityTags/EntityTags.tsx
@@ -15,9 +15,10 @@ interface Props {
tags: Array;
addressHash?: string;
isLoading?: boolean;
+ noColors?: boolean;
}
-const EntityTags = ({ tags, addressHash, className, isLoading }: Props) => {
+const EntityTags = ({ tags, addressHash, className, isLoading, noColors }: Props) => {
const isMobile = useIsMobile();
const visibleNum = isMobile ? 2 : 3;
@@ -51,6 +52,7 @@ const EntityTags = ({ tags, addressHash, className, isLoading }: Props) => {
addressHash={ addressHash }
isLoading={ isLoading }
maxW={ tagMaxW }
+ noColors={ noColors }
/>
)) }
{ metaSuitesPlaceholder }
@@ -63,7 +65,7 @@ const EntityTags = ({ tags, addressHash, className, isLoading }: Props) => {
- { tags.slice(visibleNum).map((tag) => ) }
+ { tags.slice(visibleNum).map((tag) => ) }
@@ -74,7 +76,16 @@ const EntityTags = ({ tags, addressHash, className, isLoading }: Props) => {
return (
<>
- { tags.map((tag) => ) }
+ { tags.map((tag) => (
+
+ )) }
{ metaSuitesPlaceholder }
>
);
diff --git a/ui/txs/TxsListItem.tsx b/ui/txs/TxsListItem.tsx
index c3abf6ac01..f42db8455a 100644
--- a/ui/txs/TxsListItem.tsx
+++ b/ui/txs/TxsListItem.tsx
@@ -50,7 +50,7 @@ const TxsListItem = ({
}: Props) => {
const dataTo = tx.to ? tx.to : tx.created_contract;
- const protocolTag = tx.to?.metadata?.tags?.find(tag => tag.tagType === 'protocol');
+ const protocolTag = tx.to?.hash !== currentAddress && tx.to?.metadata?.tags?.find(tag => tag.tagType === 'protocol');
return (
@@ -67,7 +67,7 @@ const TxsListItem = ({
}
- { protocolTag && }
+ { protocolTag && }
diff --git a/ui/txs/TxsTableItem.tsx b/ui/txs/TxsTableItem.tsx
index 84e92d99bc..9d1ca37e2f 100644
--- a/ui/txs/TxsTableItem.tsx
+++ b/ui/txs/TxsTableItem.tsx
@@ -51,7 +51,7 @@ const TxsTableItem = ({
}: Props) => {
const dataTo = tx.to ? tx.to : tx.created_contract;
- const protocolTag = tx.to?.metadata?.tags?.find(tag => tag.tagType === 'protocol');
+ const protocolTag = tx.to?.hash !== currentAddress && tx.to?.metadata?.tags?.find(tag => tag.tagType === 'protocol');
return (
@@ -103,7 +103,7 @@ const TxsTableItem = ({
{ tx.method }
) }
- { protocolTag && }
+ { protocolTag && }
{ showBlockInfo && (