diff --git a/src/router/index.ts b/src/router/index.ts index 5028654..4a4d2e6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -36,6 +36,7 @@ const routes: Array = [ { path: "notify", component: () => import("@/views/notify/index.vue"), + meta: { requiresAuth: true }, }, { path: "user", diff --git a/src/store/user.ts b/src/store/user.ts index c41e71a..6920b11 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -14,8 +14,10 @@ export const useUserStore = defineStore("user", () => { const isAuthenticated = computed(() => !!token.value); async function updateProfile() { + const { initializeWallet } = useWalletStore(); const { data } = await safeClient(client.api.user.profile.get(), { silent: true }); state.userProfile = data.value || null; + initializeWallet(); } function setToken(value: string) {