Skip to content

Commit 99d2e26

Browse files
committed
fix return from signout
1 parent 1680207 commit 99d2e26

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dapps/appkit-siwe/react/src/utils/siweUtils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const BASE_URL = 'http://localhost:8080';
5050

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

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

7068
// call the server to sign out
71-
const signOut = async () => {
69+
const signOut = async (): Promise<boolean> => {
7270
const res = await fetch(BASE_URL + "/signout", {
7371
method: "GET",
7472
credentials: 'include',
@@ -78,7 +76,7 @@ const signOut = async () => {
7876
}
7977

8078
const data = await res.json();
81-
return data == "{}" ? null : data as SIWESession;
79+
return data == "{}";
8280
}
8381

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

0 commit comments

Comments
 (0)