Skip to content

Commit

Permalink
fixed wallet not displaying bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dan13ram committed Feb 14, 2023
1 parent db198e7 commit 2a1a941
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions components/Layout/WalletDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const WalletDisplay: React.FC = () => {
md: 'bottom-end',
}) as PlacementWithLogical;

if (!address || !chainId || !user) return null;
if (!address || !chainId) return null;

const isSupportedChain = isSupportedNetwork(chainId);
return (
<Popover placement={placement} gutter={20} trigger="hover">
Expand All @@ -61,7 +62,7 @@ export const WalletDisplay: React.FC = () => {
<UserAvatar address={address} profile={user} size={32} />
<Flex flexDir="column">
<Text fontWeight="bold" fontSize="normal">
{user.username ?? formatAddress(address, ens)}
{user?.username ?? formatAddress(address, ens)}
</Text>
<Text fontSize="small">
{AVAILABLE_NETWORK_INFO[chainId].label}
Expand Down
2 changes: 1 addition & 1 deletion components/UserAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ENSAvatar: React.FC<{

export const UserAvatar: React.FC<{
address: string | null | undefined;
profile: MongoUser | null;
profile: MongoUser | null | undefined;
size: number;
}> = ({ address, profile, size }) => {
const avatarUri = profile?.avatarUri;
Expand Down

0 comments on commit 2a1a941

Please sign in to comment.