Skip to content

Commit

Permalink
fix(popup): avatar circle on stacks transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarkhanzadian committed Nov 27, 2023
1 parent 31ddc89 commit 8dbfefe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/features/current-account/current-account-avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ import { CircleProps } from 'leather-styles/jsx';
import { useCurrentAccountDisplayName } from '@app/common/hooks/account/use-account-names';
import { useDrawers } from '@app/common/hooks/use-drawers';
import { AccountAvatar } from '@app/components/account/account-avatar';
import { useCurrentStacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.hooks';
import { useCurrentAccountIndex } from '@app/store/accounts/account';
import { useStacksAccounts } from '@app/store/accounts/blockchain/stacks/stacks-account.hooks';
import { StacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.models';

export const CurrentAccountAvatar = memo((props: CircleProps) => {
const currentAccount = useCurrentStacksAccount();
const accountIndex = useCurrentAccountIndex();
const accounts = useStacksAccounts();
const currentAccount = accounts[accountIndex] as StacksAccount | undefined;
const name = useCurrentAccountDisplayName();
const { setIsShowingSwitchAccountsState } = useDrawers();
if (!currentAccount) return null;
Expand Down

0 comments on commit 8dbfefe

Please sign in to comment.