Skip to content

Commit 0853872

Browse files
committed
Dashboard: Fix WalletAddress ens image size (#7935)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on adjusting the size of certain UI components in the `RecentTransfers` and `WalletAddress` sections, ensuring a more consistent design across the dashboard. ### Detailed summary - In `RecentTransfers.tsx`, removed the `iconClassName` prop from a component. - In `wallet-address.tsx`, changed the size of a `div` from `size-6` to `size-5`. - Updated the `CircleSlashIcon` size from `size-6` to `size-5`. - Added a `fallback` prop to the `Img` component in `WalletAvatar`. - Changed the `size` of the `Blobbie` component in `WalletAvatar` from `24` to `20`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Added automatic address-based avatar fallback when a wallet/avatar image isn’t available. - Style - Reduced sizes for the invalid-address badge and zero-address indicator for better visual balance. - Adjusted fallback avatar size for improved consistency. - Standardized icon sizing in Recent Transfers by removing a custom icon size override. - Overall, wallet/address visuals are cleaner and more consistent across the dashboard. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 44e6e11 commit 0853872

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

apps/dashboard/src/@/components/blocks/wallet-address.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function WalletAddress(props: {
4848
return (
4949
<ToolTipLabel hoverable label={address}>
5050
<span className="flex items-center gap-2 underline-offset-4 hover:underline">
51-
<div className="flex size-6 items-center justify-center rounded-full border bg-background">
51+
<div className="flex size-5 items-center justify-center rounded-full border bg-background">
5252
<XIcon className="size-4 text-muted-foreground" />
5353
</div>
5454
Invalid Address
@@ -62,7 +62,7 @@ export function WalletAddress(props: {
6262
return (
6363
<div className="flex items-center gap-2 py-2">
6464
<CircleSlashIcon
65-
className={cn("size-6 text-muted-foreground/70", props.iconClassName)}
65+
className={cn("size-5 text-muted-foreground/70", props.iconClassName)}
6666
/>
6767
<span
6868
className={cn("cursor-pointer font-mono text-sm", props.className)}
@@ -208,14 +208,21 @@ function WalletAvatar(props: {
208208
<Img
209209
className={cn("size-5 object-cover", props.iconClassName)}
210210
src={resolvedAvatarSrc}
211+
fallback={
212+
<Blobbie
213+
address={props.address}
214+
className={props.iconClassName}
215+
size={20}
216+
/>
217+
}
211218
/>
212219
) : props.fallbackIcon ? (
213220
props.fallbackIcon
214221
) : (
215222
<Blobbie
216223
address={props.address}
217224
className={props.iconClassName}
218-
size={24}
225+
size={20}
219226
/>
220227
)}
221228
</div>

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ function RecentTransfersUI(props: {
115115
<WalletAddress
116116
address={transfer.from_address}
117117
client={props.client}
118-
iconClassName="size-4.5"
119118
/>
120119
<ArrowRightIcon className="size-4 text-muted-foreground/50 absolute -right-1 lg:right-3" />
121120
</div>
@@ -133,7 +132,6 @@ function RecentTransfersUI(props: {
133132
address={transfer.to_address}
134133
client={props.client}
135134
key={transfer.log_index}
136-
iconClassName="size-4.5"
137135
/>
138136
</div>
139137
))}

0 commit comments

Comments
 (0)