Skip to content

Commit 37aa163

Browse files
committed
add zero address fallback for publisher header (#5651)
fixes: DASH-563
1 parent c48e0c9 commit 37aa163

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useThirdwebClient } from "@/constants/thirdweb.client";
44
import { Flex, Skeleton } from "@chakra-ui/react";
55
import { useTrack } from "hooks/analytics/useTrack";
66
import { replaceDeployerAddress } from "lib/publisher-utils";
7+
import { ZERO_ADDRESS } from "thirdweb";
78
import {
89
AccountAddress,
910
AccountAvatar,
@@ -41,7 +42,11 @@ export const PublisherHeader: React.FC<PublisherHeaderProps> = ({
4142
Published by
4243
</Heading>
4344

44-
<AccountProvider address={ensQuery.data?.address || ""} client={client}>
45+
<AccountProvider
46+
// passing zero address during loading time to prevent the component from crashing
47+
address={ensQuery.data?.address || ZERO_ADDRESS}
48+
client={client}
49+
>
4550
<div className="flex items-center gap-4">
4651
<Link
4752
href={replaceDeployerAddress(

0 commit comments

Comments
 (0)