Skip to content

Commit

Permalink
fix logout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed May 8, 2023
1 parent 6a96356 commit e2e602c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/provider/modules/session/session.ts
Expand Up @@ -63,11 +63,14 @@ export const useSession = (
return;
}

await masa?.session.sessionLogout();
disconnect();
await clearSession();
try {
await masa?.session.sessionLogout();
} finally {
disconnect();
await clearSession();

logoutCallback?.();
logoutCallback?.();
}
},
[masa, clearSession, isLoggedIn, disconnect]
);
Expand Down

0 comments on commit e2e602c

Please sign in to comment.