Skip to content

Commit

Permalink
fix session loading
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Nov 18, 2022
1 parent 499e2b0 commit 81e5bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/helpers/provider/masa-context.tsx
Expand Up @@ -74,9 +74,9 @@ export const MasaContextProvider = ({
(async () => {
if (masaInstance && walletAddress) {
setLoading(true);
const sessionResponse = await masaInstance.session.getSession();
const session = await masaInstance.session.getSession();

if (sessionResponse.session.user.address !== walletAddress) {
if (session?.user.address !== walletAddress) {
await masaInstance.session.logout();
setLoggedIn(false);
}
Expand Down

0 comments on commit 81e5bbf

Please sign in to comment.