diff --git a/packages/playground/src/dashboard/twin_view.vue b/packages/playground/src/dashboard/twin_view.vue index eea433627e..08d65d0b9b 100644 --- a/packages/playground/src/dashboard/twin_view.vue +++ b/packages/playground/src/dashboard/twin_view.vue @@ -62,7 +62,7 @@
- {{ email }} + {{ profileManager.profile?.email }} mdi-pencil
@@ -189,7 +189,7 @@ import { useProfileManager } from "../stores"; import type { FarmInterface } from "../types"; import { createCustomToast, ToastType } from "../utils/custom_toast"; import { getFarms } from "../utils/get_farms"; -import { getGrid, readEmail, storeEmail } from "../utils/grid"; +import { getGrid, storeEmail } from "../utils/grid"; const profileManager = useProfileManager(); @@ -222,7 +222,7 @@ const apps = [ onMounted(async () => { const profile = profileManager.profile!; const grid = await getGrid(profile); - email.value = await readEmail(grid!); + if (!grid) { createCustomToast("Fetch Grid Failed", ToastType.danger); diff --git a/packages/playground/src/weblets/profile_manager.vue b/packages/playground/src/weblets/profile_manager.vue index 8c0c3765d9..89a2465202 100644 --- a/packages/playground/src/weblets/profile_manager.vue +++ b/packages/playground/src/weblets/profile_manager.vue @@ -701,7 +701,9 @@ async function activate(mnemonic: string, keypairType: KeypairType) { try { const grid = await getGrid({ mnemonic, keypairType }); const profile = await loadProfile(grid!); - + if (email.value) { + profile.email = email.value; + } profileManager.set({ ...profile, mnemonic }); emit("update:modelValue", false); } catch (e) {