Skip to content

Commit

Permalink
fix return from signout
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomas committed Jul 11, 2024
1 parent 1680207 commit 99d2e26
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dapps/appkit-siwe/react/src/utils/siweUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const BASE_URL = 'http://localhost:8080';

// call the server to get the session
const getSession = async () => {
console.log('loadSession');
const res = await fetch(BASE_URL+ "/session", {
method: "GET",
headers: {
Expand All @@ -63,12 +62,11 @@ const BASE_URL = 'http://localhost:8080';
}

const data = await res.json();
console.log('Session:', data);
return data == "{}" ? null : data as SIWESession;
}

// call the server to sign out
const signOut = async () => {
const signOut = async (): Promise<boolean> => {
const res = await fetch(BASE_URL + "/signout", {
method: "GET",
credentials: 'include',
Expand All @@ -78,7 +76,7 @@ const signOut = async () => {
}

const data = await res.json();
return data == "{}" ? null : data as SIWESession;
return data == "{}";
}

export const createSIWE = (chains: [number]) => {
Expand Down

0 comments on commit 99d2e26

Please sign in to comment.