diff --git a/.changelog/1632.feature.md b/.changelog/1632.feature.md new file mode 100644 index 000000000..baddc6e5b --- /dev/null +++ b/.changelog/1632.feature.md @@ -0,0 +1 @@ +Extend named accounts with ERC-20 and ERC-721 tokens diff --git a/src/app/components/Account/AccountLink.tsx b/src/app/components/Account/AccountLink.tsx index 6d84ad379..eb2dca6f7 100644 --- a/src/app/components/Account/AccountLink.tsx +++ b/src/app/components/Account/AccountLink.tsx @@ -45,6 +45,7 @@ const WithTypographyAndLink: FC<{ } interface Props { + addressAsName?: boolean scope: SearchScope address: string @@ -79,6 +80,7 @@ interface Props { } export const AccountLink: FC = ({ + addressAsName, scope, address, alwaysTrim, @@ -93,7 +95,7 @@ export const AccountLink: FC = ({ // isError, // Use this to indicate that we have failed to load the name for this account } = useAccountMetadata(scope, address) const accountName = accountMetadata?.name // TODO: we should also use the description - + const showAccountName = !addressAsName && accountName const to = RouteUtils.getAccountRoute(scope, address) const extraTooltipWithIcon = extraTooltip ? ( @@ -119,13 +121,13 @@ export const AccountLink: FC = ({ - {accountName && {accountName}} + {showAccountName && {accountName}} {address} {extraTooltipWithIcon} } > - {accountName ? trimLongString(accountName, 12, 0) : trimLongString(address, 6, 6)} + {showAccountName ? trimLongString(accountName, 12, 0) : trimLongString(address, 6, 6)} ) @@ -138,7 +140,7 @@ export const AccountLink: FC = ({ return ( - {accountName ? ( + {showAccountName ? ( ({address}) @@ -157,7 +159,7 @@ export const AccountLink: FC = ({ <> diff --git a/src/app/components/Tokens/TokenDetails.tsx b/src/app/components/Tokens/TokenDetails.tsx index a272bda50..8c931e340 100644 --- a/src/app/components/Tokens/TokenDetails.tsx +++ b/src/app/components/Tokens/TokenDetails.tsx @@ -59,7 +59,7 @@ export const TokenDetails: FC<{
{t(isMobile ? 'common.smartContract_short' : 'common.smartContract')}
- +
diff --git a/src/app/components/Tokens/TokenList.tsx b/src/app/components/Tokens/TokenList.tsx index b45633033..5a4ed1aa0 100644 --- a/src/app/components/Tokens/TokenList.tsx +++ b/src/app/components/Tokens/TokenList.tsx @@ -108,6 +108,7 @@ export const TokenList = (props: TokensProps) => { content: ( >> = { [Network.mainnet]: { [Layer.consensus]: - 'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/mainnet_consensus.json', + 'https://raw.githubusercontent.com/buberdds/nexus/main/named-addresses/mainnet_consensus.json', [Layer.emerald]: - 'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/mainnet_emerald.json', + 'https://raw.githubusercontent.com/buberdds/nexus/main/named-addresses/mainnet_emerald.json', [Layer.sapphire]: - 'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/mainnet_sapphire.json', + 'https://raw.githubusercontent.com/buberdds/nexus/main/named-addresses/mainnet_sapphire.json', }, [Network.testnet]: { [Layer.consensus]: - 'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/testnet_consensus.json', + 'https://raw.githubusercontent.com/buberdds/nexus/main/named-addresses/testnet_consensus.json', [Layer.emerald]: - 'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/testnet_emerald.json', + 'https://raw.githubusercontent.com/buberdds/nexus/main/named-addresses/testnet_emerald.json', [Layer.sapphire]: - 'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/testnet_sapphire.json', + 'https://raw.githubusercontent.com/buberdds/nexus/main/named-addresses/testnet_sapphire.json', }, [Network.localnet]: { [Layer.consensus]: undefined, diff --git a/src/app/pages/TokenDashboardPage/TokenDetailsCard.tsx b/src/app/pages/TokenDashboardPage/TokenDetailsCard.tsx index a9e496105..c4f9bc265 100644 --- a/src/app/pages/TokenDashboardPage/TokenDetailsCard.tsx +++ b/src/app/pages/TokenDashboardPage/TokenDetailsCard.tsx @@ -56,7 +56,7 @@ export const TokenDetailsCard: FC<{ scope: SearchScope; address: string; searchT )}
{t(isMobile ? 'common.smartContract_short' : 'common.smartContract')}
- +