Skip to content

Commit

Permalink
Make displayed avatars consistent for same addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Mar 27, 2024
1 parent 0eca025 commit 45bfda3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/Activity/ActivityDescriptionGovernance.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Box, Flex, Text } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { useGetMetadata } from '../../hooks/DAO/proposal/useGetMetadata';
import useAvatar from '../../hooks/utils/useAvatar';
import useDisplayName from '../../hooks/utils/useDisplayName';
import {
Activity,
Expand Down Expand Up @@ -52,6 +53,8 @@ function ProposalAuthor({ activity }: { activity: Activity }) {
: multisigProposal.confirmations[0].owner;

const { displayName: author } = useDisplayName(proposer);
const avatarURL = useAvatar(author);

return (
<Flex
gap={2}
Expand All @@ -61,7 +64,8 @@ function ProposalAuthor({ activity }: { activity: Activity }) {
>
<Avatar
size="sm"
address={author}
address={proposer}
url={avatarURL}
/>
<Box>{author}</Box>
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function Connected() {
} = useFractal();
const account = user.address;
const { displayName: accountDisplayName } = useDisplayName(account);
const avatarURL = useAvatar(account);
const avatarURL = useAvatar(accountDisplayName);

if (!account) {
return null;
Expand Down

0 comments on commit 45bfda3

Please sign in to comment.