From 8a119d93d4ddf30b18c5a550f6468ebc11e3b468 Mon Sep 17 00:00:00 2001 From: aeolian <94939382+aeolianeth@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:30:10 +1000 Subject: [PATCH] fix: account profile --- src/pages/account/[addressOrEnsName]/index.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/account/[addressOrEnsName]/index.tsx b/src/pages/account/[addressOrEnsName]/index.tsx index ad9f230cec..8af83cb12f 100644 --- a/src/pages/account/[addressOrEnsName]/index.tsx +++ b/src/pages/account/[addressOrEnsName]/index.tsx @@ -19,6 +19,10 @@ function useEnsNamePair(addressOrEnsName: string | undefined) { if (!addressOrEnsName) return const data = await resolveAddress(addressOrEnsName) + if (!data && isAddress(addressOrEnsName)) { + return { address: addressOrEnsName, name: null } + } + return data }, }) @@ -45,8 +49,12 @@ function _AccountPage({ addressOrEnsName }: { addressOrEnsName: string }) { const { data: profile } = useAccount({ address }) - if (ensLoading) return - if (!address) return null + if (ensLoading) { + return + } + if (!address) { + return
No address given.
+ } return ( <>