diff --git a/ui/pages/Address.tsx b/ui/pages/Address.tsx
index 60ce914b4c..be89c410b0 100644
--- a/ui/pages/Address.tsx
+++ b/ui/pages/Address.tsx
@@ -179,7 +179,7 @@ const AddressPageContent = () => {
const titleSecondRow = (
{
{ !isLoading && !addressQuery.data?.is_contract && config.features.account.isEnabled && (
) }
-
+
diff --git a/ui/shared/NetworkExplorers.tsx b/ui/shared/NetworkExplorers.tsx
index d187bd6203..1475375511 100644
--- a/ui/shared/NetworkExplorers.tsx
+++ b/ui/shared/NetworkExplorers.tsx
@@ -6,6 +6,7 @@ import type { NetworkExplorer as TNetworkExplorer } from 'types/networks';
import config from 'configs/app';
import arrowIcon from 'icons/arrows/east-mini.svg';
import explorerIcon from 'icons/explorer.svg';
+import stripTrailingSlash from 'lib/stripTrailingSlash';
import LinkExternal from 'ui/shared/LinkExternal';
interface Props {
@@ -17,12 +18,14 @@ interface Props {
const NetworkExplorers = ({ className, type, pathParam }: Props) => {
const { isOpen, onToggle, onClose } = useDisclosure();
- const explorersLinks = config.UI.explorers.items
- .filter((explorer) => explorer.paths[type])
- .map((explorer) => {
- const url = new URL(explorer.paths[type] + '/' + pathParam, explorer.baseUrl);
- return { explorer.title };
- });
+ const explorersLinks = React.useMemo(() => {
+ return config.UI.explorers.items
+ .filter((explorer) => typeof explorer.paths[type] === 'string')
+ .map((explorer) => {
+ const url = new URL(stripTrailingSlash(explorer.paths[type] || '') + '/' + pathParam, explorer.baseUrl);
+ return { explorer.title };
+ });
+ }, [ pathParam, type ]);
if (explorersLinks.length === 0) {
return null;