Skip to content

Commit e28eb73

Browse files
authored
SDK: Signature screen loading state improvements (#6849)
1 parent 185a3cb commit e28eb73

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.changeset/fast-bushes-juggle.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Signature Screen loading state improvements

packages/thirdweb/src/react/core/hooks/auth/useSiweAuth.ts

+1
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,6 @@ export function useSiweAuth(
148148
// checking if logged in
149149
isLoggedIn: isLoggedInQuery.data,
150150
isLoading: isLoggedInQuery.isFetching,
151+
isPending: isLoggedInQuery.isPending,
151152
};
152153
}

packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ function ConnectButtonInner(
479479
if (siweAuth.requiresAuth) {
480480
// loading state if loading
481481
// TODO: figure out a way to consolidate the loading states with the ones from locale loading
482-
if (siweAuth.isLoading || siweAuth.isLoggingIn || siweAuth.isLoggingOut) {
482+
if (siweAuth.isPending || siweAuth.isLoggingIn || siweAuth.isLoggingOut) {
483483
const combinedClassName = `${props.connectButton?.className || ""} ${TW_CONNECT_WALLET}`;
484484
return (
485485
<AnimatedButton

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const SignatureScreen: React.FC<{
7171
}
7272
}, [onDone, siweAuth]);
7373

74-
if (!wallet || siweAuth.isLoading) {
74+
if (!wallet || siweAuth.isPending) {
7575
return <LoadingScreen data-testid="loading-screen" />;
7676
}
7777

0 commit comments

Comments
 (0)