Skip to content

Commit 0ab1407

Browse files
authored
Fix wallet image fallback (#3000)
1 parent cf7b6fc commit 0ab1407

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/bright-eyes-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix WalletImage fallback icon

packages/thirdweb/src/react/web/ui/components/Img.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const Img: React.FC<{
2727
const widthPx = `${props.width}px`;
2828
const heightPx = `${props.height || props.width}px`;
2929

30-
if (!propSrc) {
30+
if (propSrc === undefined) {
3131
return <Skeleton width={widthPx} height={heightPx} />;
3232
}
3333

packages/thirdweb/src/react/web/ui/components/WalletImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function WalletImageQuery(props: {
112112
return (
113113
<Img
114114
client={props.client}
115-
src={walletImage.data}
115+
src={walletImage.isLoading ? undefined : walletImage.data || ""}
116116
fallbackImage={genericWalletIcon}
117117
width={props.size}
118118
height={props.size}

0 commit comments

Comments
 (0)