Skip to content

Commit f745ece

Browse files
authored
[Human App] fix: remove token clearing on welcome page render (#2844)
1 parent ebc4df6 commit f745ece

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/apps/human-app/frontend/src/auth-web3/web3-auth-context.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export function Web3AuthProvider({ children }: { children: React.ReactNode }) {
103103
browserAuthProvider.signOut({
104104
triggerSignOutSubscriptions: throwExpirationModal,
105105
});
106+
106107
setWeb3AuthState({ user: null, status: 'idle' });
107108
};
108109

packages/apps/human-app/frontend/src/pages/homepage/components/operator-signin.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ export function OperatorSignIn() {
2020
const { user, signOut } = useWeb3Auth();
2121
const modalWasOpened = useRef(false);
2222

23-
useEffect(() => {
24-
signOut(false);
25-
// eslint-disable-next-line react-hooks/exhaustive-deps -- ...
26-
}, []);
27-
2823
useEffect(() => {
2924
if (isConnected && modalWasOpened.current) {
3025
signInMutation({ address, type: PrepareSignatureType.SignIn });
@@ -64,6 +59,7 @@ export function OperatorSignIn() {
6459
fullWidth
6560
onClick={() => {
6661
modalWasOpened.current = true;
62+
signOut();
6763
void openModal();
6864
}}
6965
size="large"

0 commit comments

Comments
 (0)