Skip to content

Commit

Permalink
Merge pull request #1972 from threefoldtech/development_close_profile…
Browse files Browse the repository at this point in the history
…_manager

close profile manager after login and logout
  • Loading branch information
mohamedamer453 authored Jan 15, 2024
2 parents b802835 + eaabb9d commit 755bfa4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/playground/src/weblets/profile_manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ import { normalizeBalance, normalizeError } from "../utils/helpers";
const items = ref([{ id: 1, name: "stellar" }]);
const depositWallet = ref("");
const selectedName = ref("");
const openDepositDialog = ref(false);
const selectedItem = ref(items.value[0]);
const depositFee = ref(0);
interface Credentials {
Expand All @@ -424,7 +423,7 @@ const props = defineProps({
type: Boolean,
},
});
defineEmits<{ (event: "update:modelValue", value: boolean): void }>();
const emit = defineEmits<{ (event: "update:modelValue", value: boolean): void }>();
const bridge = (window as any).env.BRIDGE_TFT_ADDRESS;
const apps = [
Expand Down Expand Up @@ -483,6 +482,7 @@ async function mounted() {
if (grid) {
const DepositFee = await grid.bridge.getDepositFee();
depositFee.value = DepositFee;
return;
}
} catch (e) {
console.log(e);
Expand Down Expand Up @@ -606,6 +606,7 @@ function logout() {
if (router.currentRoute.value.path.includes("/overview")) {
router.push("/");
}
emit("update:modelValue", false);
}
const activating = ref(false);
Expand Down Expand Up @@ -634,6 +635,7 @@ async function activate(mnemonic: string, keypairType: KeypairType) {
const profile = await loadProfile(grid!);
profileManager.set({ ...profile, mnemonic });
emit("update:modelValue", false);
} catch (e) {
loginError.value = normalizeError(e, "Something went wrong while login.");
} finally {
Expand Down

0 comments on commit 755bfa4

Please sign in to comment.