|
@@ -1,7 +1,10 @@
|
|
|
+import { useGlobalStore } from "@/stores";
|
|
|
+import { useWalletStore } from "@/stores/useWalletStore";
|
|
|
import actions from "@/utils/client/actions";
|
|
|
import Request from "./axios";
|
|
|
|
|
|
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
|
|
|
+
|
|
|
const server = new Request({
|
|
|
timeout: 10 * 1000,
|
|
|
baseURL: BASE_URL,
|
|
@@ -24,6 +27,8 @@ const server = new Request({
|
|
|
switch (code) {
|
|
|
case 401:
|
|
|
localStorage.removeItem("globalStore");
|
|
|
+ useWalletStore.getState().reset();
|
|
|
+ useGlobalStore.getState().reset();
|
|
|
await actions();
|
|
|
break;
|
|
|
default:
|