Skip to content

Commit

Permalink
display token count in wallets list page
Browse files Browse the repository at this point in the history
  • Loading branch information
vorujack committed Apr 17, 2024
1 parent 78b36a3 commit ca34989
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/wallets/Wallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const Wallets = () => {
name={item.name}
type={item.type}
net={item.networkType}
tokensCount={item.tokens.length}
amount={BigInt(item.balance)}
key={index}
/>
Expand Down
6 changes: 6 additions & 0 deletions src/pages/wallets/components/WalletItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface PropsType {
type: WalletType;
net?: string;
amount?: bigint;
tokensCount?: number;
onClick?: () => unknown;
}

Expand Down Expand Up @@ -90,6 +91,11 @@ const WalletItem = (props: PropsType) => {
</Typography>
) : null}
</Box>
{props.tokensCount && props.tokensCount > 0 ? (
<Typography variant="body2" color="textSecondary">
Includes {props.tokensCount} token{props.tokensCount > 1 ? 's' : ''}
</Typography>
) : null}
</Box>
</CardActionArea>
</Card>
Expand Down

0 comments on commit ca34989

Please sign in to comment.