Skip to content

Commit 4ccf062

Browse files
[SDK] Fix loading state in PayEmbed source tokens (#6778)
1 parent d7dc83f commit 4ccf062

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/tender-parrots-stare.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix loading state when loading source tokens in PayEmbed

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@ export function TokenSelectorScreen(props: {
176176
enabled: !!props.sourceSupportedTokens && !!chainInfo.data,
177177
});
178178

179-
if (walletsAndBalances.isLoading || chainInfo.isLoading) {
179+
if (
180+
walletsAndBalances.isLoading ||
181+
chainInfo.isLoading ||
182+
!chainInfo.data ||
183+
!props.sourceSupportedTokens
184+
) {
180185
return <LoadingScreen />;
181186
}
182187

@@ -307,6 +312,7 @@ function WalletRowWithBalances(props: {
307312
style={{
308313
borderRadius: radius.lg,
309314
border: `1px solid ${theme.colors.borderColor}`,
315+
minHeight: "350px",
310316
}}
311317
>
312318
<Container

0 commit comments

Comments
 (0)